Juniper Networks Reference
Juniper Networks Reference
Copyright
Many of the designations used by manufacturers and sellers to distinguish their products
are claimed as trademarks. Where those designations appear in this book, and Addison-
Wesley was aware of a trademark claim, the designations have been printed with initial
capital letters or in all capitals.
The authors and publisher have taken care in the preparation of this book, but make no
expressed or implied warranty of any kind and assume no responsibility for errors or
omissions. No liability is assumed for incidental or consequential damages in connection
with or arising out of the use of the information or programs contained herein.
The publisher offers discounts on this book when ordered in quantity for bulk purchases
and special sales. For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419
[email protected]
www.ebook-converter.com
For sales outside of the U.S., please contact:
International Sales
(317) 581-3793
[email protected]
Visit Addison-Wesley on the Web: www.awprofessional.com
Library of Congress Cataloging-in-Publication Data
Juniper Networks reference guide : JUNOS routing, configuration, and architecture /
Thomas M. Thomas II … [et al.].
Downloader demo watermarks
p.cm,
Includes bibliographical references and index.
1
Copyright
ISBN 0-201-77592-1 (alk.paper)
1. Routers (Computer networks) 2. Juniper Networks, Inc. I. Thomas, Thomas M.
TK5105.543 .J87 2002
004.6—dc21 2002026263
Copyright © 2003 by Pearson Education, Inc.
All rights reserved. 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, or otherwise, without the prior consent of the publisher. Printed
in the United States of America. Published simultaneously in Canada.
For information on obtaining permission for use of material from this work, please submit
a written request to:
Pearson Education, Inc.
Rights and Contracts Department
www.ebook-converter.com
75 Arlington Street, Suite 300
Boston, MA 02116
Fax: (617) 848-7047
Text printed on recycled paper
1 2 3 4 5 6 7 8 9 10—CRW—0605040302
First printing, October 2002
www.ebook-converter.com
readers to the strong entry of Juniper Networks into carrier-class routing and discusses
the company's efforts in education and certification with a brief review of core
technologies. Part II, “System Configuration,” covers all the steps needed to install a
Juniper Networks router and make it function to include network management and
security.
Part III, “Interface and Routing Protocol Configuration,” covers internal routing
protocols, such as Open Shortest Path First (OSPF) and Intermediate System to
Intermediate System (IS-IS), and provides an extensive discussion of external gateway
protocols, such as BGP. Part IV, “Advanced Router Operation and Configuration,”
covers routing policies, along with MPLS, VPNs, and Multicast.
www.ebook-converter.com
James Sonderegger
Doris Pavlichek
www.ebook-converter.com
Many people were instrumental in helping me reach my goals for this book. First and
foremost, I would like to thank Tom for convincing me to make another contribution to
the world of technical books. I would also like to thank Larry, James, Rajah, and Wayne
for their assistance in getting me up to speed as I came in at a later stage of the project,
and for answering those frantic late-night e-mail requests. Thanks to Paul Pavlichek, from
whom I got a lot of feedback and background on some of the intricacies of Juniper
architecture. He was also a big help in obtaining practical examples. I would be remiss if I
did not also thank my children, Sean and Stephanie, for putting up with my ducking into
the library immediately after dinner every night while working on this book and Paul for
helping with homework and weekend entertainment. Thanks, guys!
Larry Dwyer
Downloader demo watermarks
The first time you agree to a project like this, you have absolutely no concept of the
effort involved in seeing it to completion. I have found new respect for all those involved
in these types of tasks. I would like to thank Tom Thomas for asking me to be a part of
this. I have learned far more than additional ways to configure a router. Lori Andrews
6
Acknowledgments
and Ed Mills have been my sanity checks, and for that I am very grateful. Late nights can
do terrible things to one's intended words. Tommy Morris gave me that foot in the door,
trusting me to live up to what I said I could do, which eventually opened into this
wonderful world. But I owe the most, the all, to my loving wife, Patty, who has given up
time, time that can't be gained, purchased, or returned. She has done so with patience and
grace, just so I could fulfill a desire.
Rajah Chowbay
It is true that all things are possible if you just see them through. First, I would like to
thank the team, especially Tom for encouragement and James for a shoulder to lean on.
Second, I thank my children, Andrew, Max, and Marcus, for understanding that “Dad
can't right now.” Finally, a very special thanks to my best friend and soul mate, my wife,
Jacqui, for always believing in us. Jacqui, you make every day the best day of my life.
Wayne Downing
First and foremost, to James Sonderegger, thanks for your assistance in getting the job
done. To Rebecca Greenberg, thanks for your professionalism and constructive
comments during the editing phase. I want to send a special word of thanks to Karen
www.ebook-converter.com
Gettman and Emily Frey for putting up with the slips; your guidance during this project is
appreciated. To Jen Kelland for the last-minute edits. To Ronan McLaughlin, thanks for
the late-night conversations and keeping me focused on the job at hand; your guidance in
the realm of Juniper and this project was instrumental. And, of course, to the rest of the
author team, thanks for making this happen. It has been my pleasure to keep such great
company. On a personal note, I want to thank my dad, Big Wayne; Dude, I don't know
what to say, except thanks for everything! To my mom and sister for the non stop “How's
the book going?” questions, which were very inspirational. To Matt, Dad, and Kathy,
thanks for those first two computers, and to my big sis, Karen, thanks for loaning me the
500 bucks to expand them so I could start coding. To the El-hage, Misleh, Rafidi, and
Taweel families, I appreciate all the support. Chahine, thanks for your encouraging
remarks; they meant the world to me! Sam and Rima, thanks for knowing when I needed
a break—Sam and Harry's is on me next time! To John, Sanaa, Nicole, and Danielle, I'll
make the basketball games next season! To Renda, my lovely wife, this could not have
Downloader demo watermarks
happened if it were not for you and your support. Thanks be to God, our Father, and his
Son, Jesus Christ, who gave his life so I could live.
I dedicate my work on this book to the two people who have influenced my life the most:
7
Acknowledgments
my wife, Renda, and my dad. Dad (a.k.a. Big Wayne, commonly referred to as Dude),
thanks for giving me the intestinal fortitude to overcome adversity and drive on! Most of
all I dedicate this book to my wife, Renda. I love you for all eternity. Thank you for
letting me be myself and showing the kindness, compassion, and loving touch only you
could provide. You both set the standard that all others should live by! MOMO, Daddy
can play now!
James Sonderegger
First, I thank my wife, Bonnie, and my daughter, Gabby, for being so supportive
throughout this project. They are my inspiration and strength, and I would be lost without
them. I thank my mom, Barbra, for not letting me forget who I am. I also thank my dad,
Gordon, for understanding how important this endeavor was to me and for tolerating my
reclusive behavior during the holidays last year. I thank all of the friends who continue to
speak to me, no matter how crazy things get. Lastly, I thank the instructors who have
helped me in my chosen profession: Matthew Shaul, Joe Staron, Orin Blomberg, and Paul
Masters.
www.ebook-converter.com
Past Architectures
In the early 1990s, before the major growth phase of the Internet, backbone transmission
lines had reached DS3 (44.7Mbps) speeds. Up until this point, the demand for bandwidth
Downloader demo watermarks
was not as great. Routers of this period were based on a single central processing unit
(CPU) and monolithic software design. However, as traffic volumes began to increase
and contention and congestion issues became more prevalent, we began to see a change
in how these routers handled the load.
11
1. Juniper Networks from the Internet to the Classroom
In the single-CPU architecture, there are a finite number of CPU cycles per second that
can be used by the operating system for routine or ad hoc tasks. Early attempts at traffic
engineering were nothing more than additional processes for the CPU to handle. The
CPU was already dealing with processes like packet forwarding, routing table lookups,
access control lists (ACLs), and protocol processes, in addition to normal system-
management functions. As with any situation where there are finite resources available,
you must optimize them. The problem is that there is always a point where optimization
ends and best effort begins. Prior to any end-to-end traffic engineering, packet delivery
was always done on a best-effort basis. When best efforts no longer provided the level of
service necessary, other methods were developed.
In addition to the single-CPU architecture, routers had monolithic operating systems. A
router operating system typically performs four tasks:
1. Process Management
2. Memory Management
3. File System Management
4. I/O Device Management
www.ebook-converter.com
These functions can be performed in one of two ways:
1. At the user level
2. At the system level
In a monolithic structure, any management function or module can call any other
function or module because they are all running essentially at system level. When
operating systems are designed in a monolithic fashion, they typically have very large
kernels. The larger the base for a kernel, the greater the potential for instability.
In addition to kernel issues, the router might also have stability problems with individual
processes. For instance, in a monolithic structure, if a routing process stops working, it
may cause other processes, such as forwarding, to lock up as well, which can snowball
Downloader demo watermarks
into a systemwide problem. Such lock ups usually require a router reboot.
In the early 1990s, when the networking industry really began to evolve, computing
platforms were just beginning to gain momentum. So, as the need to increase
12
1. Juniper Networks from the Internet to the Classroom
functionality grew, upward scalability hit a ceiling. In 1993, a 66-MHz Intel 486
processor was typical. Routing platforms were being developed to take advantage of
similar processor architectures and speeds. With this, distributed-computing networks
were becoming commonplace. Enterprise networks were becoming fairly large and
spanning the globe in some cases. With this increase in disparate networks, the amount of
wide-area network (WAN) traffic increased, as well.
When it came to computing power and software design, the use of centralized processing
(single CPUs) and monolithic software became the dominating architecture. This type of
platform had poor scalability. In a situation where the routing architecture was very
stable and packet-forwarding rates were low, there was not much of a problem. As soon
as new traffic-engineering methods and larger demands started hitting the marketplace,
the routers soon began to experience problems due to their limitations. One of the major
limiters was the need to provide IntServ end-to-end while still maintaining a certain level
of quality. These technologies, as the next section explains, require performance
guarantees based upon the particular service being used.
IntServ
IntServ consists of voice, video, and data, real-time or not, over a single communications
infrastructure—the Internet. The Internet is the place where you can find virtually all
www.ebook-converter.com
application technologies at work: voice communications, video conferencing solutions,
streaming services, other multimedia applications, and typical data traffic. The goal of the
network provider is to enable these services with end-to-end quality of service (QoS).
The old best-effort data delivery model still works for a lot of services, such as e-mail and
File Transfer Protocol (FTP), but voice and video are less tolerant of that type of delivery
and require newer delivery models using QoS. The IntServ model was defined in Request
for Comments (RFC) 1633, “Integrated Services in the Internet Architecture: An
Overview.” The following excerpt from RFC 1633 provides a solid definition for
Integrated Services.“The [IntServ] model we are proposing includes two sorts of service
targeted towards real-time traffic: guaranteed and predictive service.” The phrase
“guaranteed and predictive service” says quite a bit in itself as this is what everyone is
marketing in one form or another. In review, you cannot help but see how this can solve
quite a number of our problems. It also motivates companies like Juniper Networks to
Downloader demo watermarks
create purpose-built products.
To achieve end-to-end guaranteed quality, several technologies have been introduced,
such as Resource Reservation Protocol (RSVP) and Differentiated Services (DiffServ).
13
1. Juniper Networks from the Internet to the Classroom
Again, we are looking at a model and not necessarily at a single method. These
technologies can be used to assist in the end-to-end QoS function and compliment one
another versus other solutions.
End-to-end QoS can be achieved through a variety of methods. RSVP, for instance, is
used as a signaling protocol to reserve resources through a network for a given flow.
DiffServ, on the other hand, is typically used on a hop-by-hop basis, where classes of
services are defined. Also on a per-hop basis, forwarding decisions are made. These
services can be used in conjunction with one another or independently. So, you can see
that there are mechanisms in the IntServ model that can be implemented to overcome the
typical best-effort delivery model for network traffic.
RSVP is used to reserve a path within single or multiple networks for end-to-end
communications. In other words, it is used to establish a flow from one end point to
another. When this flow is complete, RSVP can then tear down the reservation and free
up resources for other pending reservations. It provides the signaling required to prepare
these reservations based upon IntServ-defined service classes. Ultimately, these service
classes need to be defined with some equivalency between multiple networks. As with
any QoS implementation, interdomain QoS is of concern. The administrators of one
autonomous system (AS) are unlikely to allow automated or manual control of QoS
mechanisms by an outside administration. So, commonality can only be predicted within
www.ebook-converter.com
a single AS.
DiffServ uses a concept known as the differential service code point (DSCP), which uses
the type-of-service (ToS) bits in the Internet Protocol version 4 (IPv4) header and class-
of-service (CoS) bits in the Internet Protocol version 6 (IPv6) header. Service-class
parameters are set by the use of DSCP bits. These bits can be meaningful on a per-hop
basis.
www.ebook-converter.com
congestion and contention issues.
During this same period, MPLS was being developed. The concept was that through the
use of labels only 4 bytes in length, lookup and forwarding could occur at much faster
rates. (However, as you will see later in this book, MPLS is no longer being used in the
way it was planned, and IP/ATM overlay networks are quickly being replaced by high-
speed Synchronous Optical Network (SONET) transmission systems that create even
larger bandwidth pipes.) At the same time, other advances in technology were being
developed. Although some of this technology was not exploited fully, a true leader
emerged in Juniper Networks.
When Juniper introduced its first product, the M40, it reinvented the wheel, so to speak.
The wheel was now more efficient, however. Instead of using a monolithic-operating-
systems approach, Juniper took a microkernel approach. Instead of using a single CPU
Downloader demo watermarks
for processing power, it moved to a distributed-processing architecture. This move was
made possible by the advent of high-performance processors and high-performance
application-specific integrated circuits (ASICs). Now, instead of having routing and
forwarding running on the same processor, separate processors (ASICs) handle each task.
15
1. Juniper Networks from the Internet to the Classroom
Software no longer runs within the confines of one huge module; it is controlled by a
kernel making all the calls to the dedicated processors. This efficiency becomes apparent
when you have a problem with a single function. You can restart a process without
having to reboot the entire router. This is one of the real strengths of the Juniper
Networks Operating System (JUNOS): no more rebooting the entire router if a processor
gets stuck.
As they have in the past, future Internet architectures will rely more on underlying
physical technology. As advances are made and incorporated into our industry, network
service providers are in a better position to provide the level of service necessary.
www.ebook-converter.com
Core
The M-Series of routers are capable of handling core-traffic demands while addressing
both QoS and CoS issues. With the use of the new Internet Processor II and functionality
available in the JUNOS code, the M-Series routers outperform, with greater reliability,
any other core device.
The core segment consists of many different operational functions. Some of these
functions are line-rate forwarding, peering, IP/ATM, MPLS, Multicast, and Layer 2 and
Layer 3 virtual private networks (VPNs). Juniper Networks routers are capable of
providing all of these services on a single platform.
Edge
Downloader demo watermarks
Edge aggregation is currently one of the fastest growing sectors in the carrier market
space. The continuing growth of the Internet forces providers to develop greater
scalability at the edge and smooth migration strategies. The M-Series allows this. Its
17
1. Juniper Networks from the Internet to the Classroom
design means the new core can be established and the dual-purpose router can be pushed
to the edge, providing maximum port density.
On the edge, the M-Series routers provide both dedicated access solutions and edge
aggregation. The ability to provide port density, forwarding performance, and packet
processing without sacrificing overall performance makes the M-Series a solid contender
in the service provider industry. The smaller access market is being addressed with the
M5 and M10 products. The current throughput capabilities of both the M5 and M10
positions make either a good choice for an enterprise core attached to an upstream of
M20 or M40 routers.
Mobile
The current mobile network infrastructures are migrating to next-generation (2.5G) and
third-generation (3G) networks. This creates a strong case for an Internet Protocol (IP)-
based core platform capable of providing end-to-end QoS and full scalability.
With this continuing evolution of wireless technologies, integrating these services into
existing architectures is essential. With current and projected growth of the subscriber
base for this aspect of the industry, robust functionality is key. The ability to provide
IPv4, IPv6, MPLS, and VPN solutions is critical to the mobile infrastructure. Juniper
www.ebook-converter.com
Networks provides a scalable architecture that will allow operators to grow while still
getting a good return on their investment.
In summary, Juniper Networks targets the core, edge, and mobile market segments. It
also deploys, however, into the smaller competitive local exchange carrier (CLEC) and
metropolitan area networks (MANs), as well as into large-enterprise infrastructures. Its
competitive edge in performance alone will likely continue to guarantee success in these
areas.
M-Series Models
Juniper Networks offers the M-Series family of routers to meet the needs for the three
key market segments. This section introduces these models in the order in which they
Downloader demo watermarks
appeared, but for more detailed information, refer to Chapter 3.
M40
18
1. Juniper Networks from the Internet to the Classroom
The M40, introduced in September 1998, was the first model to market. With its 40Gbps
throughput, it typically is used at the network edge. Lack of component redundancy in
this architecture makes utilization as a core or peering device less desirable.
M20
The M20 was introduced in December 1999. It was the first Juniper Networks router to
use the improved Internet Processor II ASIC. The M20 is capable of 20Gbps throughput
and supports routing engine redundancy. This makes it a more attractive choice for
peering and midrange core applications.
M160
The M160 first shipped in March 2000 and was the first router to market with an optical
carrier (OC)-192 (10Gbps) interface. The M160 is capable of 160Gbps throughput, the
highest port density of any Juniper Networks offering and the best choice for the service-
provider core. Unlike smaller core networks, the Internet service provider (ISP) core is
based upon carrier-class performance. This means that the platform must operate within
defined parameters relating to redundancy, survivability, and uptime. Although the
numbers remain undisclosed by Juniper Networks, the mean time between failures
(MTBF) is estimated to be more than 200,000 hours. The numbers vary based upon
www.ebook-converter.com
platform and hardware configurations.
Independent testing has shown the M160 to outperform the competition in Border
Gateway Protocol (BGP) table capacity, MPLS label-switched-path (LSP) capacity,
route flapping recovery at OC-192 speeds, convergence at both OC-192 and OC-48
speeds, and filtering at both OC-192 and OC-48 speeds. In additional tests, the M160 has
matched or exceeded the competition in the areas of CoS at OC-48 and OC-192 speeds,
and IP and MPLS baseline testing at OC-48 and OC-192 speeds.[2] The M160 platform
provides maximum throughput and the port density necessary for the next generation of
Internet architectures. The leveraging of the M160 for core routing, anywhere
performance, and end-to-end QoS makes it a premier leader now and for the foreseeable
future.
M40e
The newest of the M-Series products, introduced in 2002, is the M40e. This model
provides a more resilient architecture than the M40 because it is equipped with redundant
switching and routing engines. This makes the platform a scalable replacement for the
M20 on the edge because of its higher port density. It is also a good choice for the
network core. The continuing evolution of Juniper Networks products provides more
evidence of their commitment to providing high-performance, resilient, scalable solutions.
www.ebook-converter.com
The J20/AXB 250 06 Gateway GPRS Support Node (GGSN) (a joint venture with
2.
Ericsson)
G10
Through an acquisition, Juniper Networks has brought the G10 CMTS device to the
cable-based carrier network. The advanced capability of the G10 allows cable companies
to provide next-generation IP services to their customers at a low cost per port.
www.ebook-converter.com
Then, in late 2001, Juniper Networks Education altered their curriculum again and
returned to a week of training that is made up of two courses: Introduction to Juniper
Networks Routers 1 and 2.
Introduction to Juniper Networks Routers 1 (3 days)
Introduction to Juniper Networks Routers 2 (2 days)
Advanced MPLS
Advanced VPN Workshop
Advanced Policy
www.ebook-converter.com
Introduction to Juniper Interconnecting Cisco Network Devices (ICND) and
Networks Routers 1 and 2 Building Scalable Cisco Internetworks (BSCI)
Advanced MPLS Avanced MPLS VPN Solutions
Advanced VPN Workshop
Advanced Policy No equivalent course[1]
Class of Service (not released Unknown
yet)
[1] An equivalent course would cover Cisco access-control-list (ACL) development and
deployment in depth.
The Juniper Networks Web site is a good source for any new information or changes. It
can also help you decide whether these courses will help prepare you for the Juniper
Networks Certified Internet Specialist (JNCIS) and Juniper Networks Certified Internet
Downloader demo watermarks
Expert (JNCIE) tests. These courses will not totally prepare you; however, according to
Juniper Networks, the “curriculum will increase the student's knowledge plus improve the
chances for quicker completion of Juniper Networks Technical Certification Program
requirements. None of the courses are required to qualify to take the exams for the
22
1. Juniper Networks from the Internet to the Classroom
certifications” (Juniper Networks Web site, www.juniper.net/training/certification,
August 2001). So, although these courses will increase your knowledge and give you
insight into the Juniper Networks methodology, they will not, in and of themselves,
guarantee that you will pass the exams.
Course Descriptions
www.ebook-converter.com
The following sections present an overview of each of the courses that Juniper Networks
has released as of this writing. The course descriptions reflect many of the advanced
topics and attention to detail that the new curriculum has in place. One of the most
important reasons for including this information in this book is that Juniper Networks has
published a series of stringent prerequisites.
Before taking this course, students should have solid knowledge of protocol
troubleshooting and JUNOS software operation and configuration. There are no official
pre requisites for this course, although it is recommended that the student first complete
“Introduction to Juniper Networks Routers 1”; keep in mind that Juniper has
expectations regarding student knowledge prior to registering for the course (see
www.juniper.net/support/training/prerequisites.html). This 2-day course builds on
Introduction to Juniper Networks Routers 1, providing additional information and
coverage of more advanced topics, such as MPLS, multicast, and firewalls. This course is
designed to prepare students for the more advanced courses.
Advanced MPLS
The following information is taken directly from the Juniper Networks Web site at
www.juniper.net/support/training/EDU-JUN-MPLS.html. Students should be able to
configure an internal BGP (IBGP) full mesh without assistance and should have
knowledge of static LSP configuration and no-CSPF-signaled LSP configuration to the
extent covered in the Juniper Networks Five-Day Bundle. This 3-day course provides a
detailed examination of MPLS and how it is implemented in the JUNOS Internet
software. The course starts with a review of MPLS, then provides detailed discussions of
RSVP, constraint-based routing, and traffic protection. The complexities of implementing
www.ebook-converter.com
LSPs in the network with forwarding adjacencies and traffic engineering are then
discussed. Other topics covered are controlling LSP performance through load balancing,
IP-LSP prefix binding, the time-to-live (TTL) field, CoS behavior, circuit cross connect
(CCC), which makes an LSP look like a Layer 2 circuit, Label Distribution Protocol
(LDP), and network management and troubleshooting. All course modules have
accompanying labs. The final lab of the course is a troubleshooting exercise in which the
student diagnoses and repairs a broken network.
www.ebook-converter.com
Juniper Networks Knowledge Centers
Juniper Networks–owned and –operated training centers are known as knowledge
centers. At these centers, you can take the courses discussed in this chapter from a
Juniper Networks Authorized Instructor (JNAT). JNAT is yet another certification, which
deals with the ability to deliver training courses effectively and accurately. The JNAT has
an equivalent certification in the Cisco Certified System Instructor (CCSI). As of this
printing, there are three locations where you can attend this training:
Herndon, Virginia, USA
Sunnyvale, California, USA
Downloader
Amsterdam, the Netherlands
demo watermarks
Juniper Networks does not currently offer any type of electronic or online learning
programs. However, they have expanded slightly the places where you can get training
through its Training Partner Program. You can find a listing of training partner program
25
1. Juniper Networks from the Internet to the Classroom
locations on the Juniper Networks Web site at
www.juniper.net/contactus.html#education_services. Note that Juniper Networks offers
onsite and customized training, on a case-by-case basis. Please contact Juniper Networks
directly for assistance and information.
www.ebook-converter.com
Ericsson, which has OEM agreements on the entire line of Juniper Networks routers, also
offers training for these products. Ericsson has a product unit known as Ericsson IP
Infrastructure that has offices in Santa Barbara, California; Rockville, Maryland;
Brussels, Belgium; Hong Kong, China; and Stockholm, Sweden. They are not listed as
authorized education centers owing to the OEM agreement. They are sold as Ericsson-
labeled products.
JNCIS
The JNCIS is a 90-minute, 73-question, multiple-choice and task-driven test with a
passing score of 70 percent. This exam is computer-based and available at Prometric
testing centers for a cost of US$125. The test is geared directly towards individuals
working within the ISP industry who are using Juniper Networks products. Questions
stress knowledge of the JUNOS command-line interface (CLI) hierarchy, as well as BGP
www.ebook-converter.com
regular expressions. In one test taker's experience, the questions regarding router
configuration did not, as Cisco certification tests typically do, require typing commands
or choosing from a list of commands.
The scope of the material covered by the Juniper Networks multiple-choice exam is
great, and the difficulty of the test is compounded in an interesting way: For most
questions, there are Cisco-centric commands mixed in with the correct answers.
When taking the JNCIS be aware of the following 11 categories of questions:
OSPF
IS-IS
Downloader
BGP
Hardware
demo watermarks
MPLS
27
1. Juniper Networks from the Internet to the Classroom
Network management
Security
Interfaces
Miscellaneous
Policy
Multicast protocols and architectures
Your printed test results will be provided to you upon completion of the exam. It will
show the percentage answered correctly in each area. For example, you may get 33
percent correct in the network-management category. This will help you to identify and
determine areas where you need to improve. Juniper Networks limits applicants to three
attempts in 6 months. After passing this test, you have 12 months to take the JNCIE
practical exam.
JNCIE
www.ebook-converter.com
The JNCIE is a 2-day exam (8 hours per day) held at select Juniper Networks locations
(these locations will be identified later in this chapter). To attempt this test, you must
have passed the JNCIS exam within the past year. The exam is monitored and
videotaped. Your pass/fail status will be available within 10 calendar days of completing
the exam. During this exam, you will be expected to deal with routes and traffic that is
both “live” and artificially generated. If you do not pass the exam, there is a mandatory
2-month waiting period instituted by Juniper Networks between test attempts. If you pass
the test, you must renew your certification every 2 years with an online test and
attendance at the Juniper Networks IP Focus conference.
The goal of the JNCIE Practical Exam is to have the candidate build and troubleshoot a
network using technologies that would be found in today's Internet. Specifically, this
means that you can expect a pure IP-based network with complex scenarios that test
28
1. Juniper Networks from the Internet to the Classroom
As of the writing of this book, there are 16 JNCIEs worldwide, the majority of which are
employed by Juniper Networks. Chief Technology Officer Pradeep Sindhu of Juniper
Networks was granted JNCIE #1. The benefits of JNCIE certification include being
presented with an engraved crystal plaque recognizing your accomplishment, the ability
to use a Juniper Networks Certification Logo, and 24/7-priority access to the Juniper
Technical Assistance Center (JTAC).
You can take the JNCIE lab exam at three locations in the world:
1. Amsterdam, the Netherlands
2. Sunnyvale, California, USA
3. Herndon, Virginia, USA
The most up-to-date certification information can be found online at
www.juniper.net/training/certification/resources.html.
www.ebook-converter.com
Networks certifications. This text is one of the best resources for the information.
Another excellent source is the Juniper Web site, itself, at www.juniper.net/techpubs.
The documents at this site will be referenced throughout this book.
Recommended Reading
The first step in preparing to take any course or certification exam is adequate
preparation. This is especially true if you are preparing for a hands-on practical
certification test. One of the best ways to prepare for a Juniper Networks certification is,
of course, to read this book. The exam also presumes a certain level of knowledge. One
of the ways Juniper Networks developed the exam was to define the knowledge and
resources you should use to prepare. These requirements grow ever larger as you
approach the JNCIS level.
Based on the recommendations from Juniper Networks, we have developed a list of
books to help you prepare for the entire range of Juniper Networks certifications. This
recommended reading includes many popular networking books that have stood the test
of time and peer review, so we feel comfortable in recommending them.
Introductory text
Cisco Internetworking Handbook, 2nd ed., Cisco Press.
www.ebook-converter.com
TCP/IP theory
W. Richard Stevens, TCP/IP Illustrated, Volume 1: The Protocols, Addison-Wesley,
1994.
F. Baker (ed), RFC1812: Requirements for IP Version 4 Routers.
Jeff Doyle, Routing TCP/IP, Vols. 1 and 2, Cisco Press.
BSD Networking code
Gary R. Wright and W. Richard Stevens, TCP/IP Illustrated, Volume 2: The
Implementation, Addison-Wesley, 1995.
Downloader
BGP demo watermarks
Sam Halabi and Danny McPherson, Internet Routing Architectures, 2nd ed., Cisco
Press.
30
1. Juniper Networks from the Internet to the Classroom
John W. Stewart, BGP4 Inter-Domain Routing in the Internet, Addison-Wesley,
1999.
OSPF
Thomas M. Thomas II, OSPF Network Design Solutions, 2nd ed., Cisco Press.
John T. Moy, OSPF: Anatomy of an Internet Routing Protocol, Addison-Wesley,
1998.
ISIS
ISO10589: IS-IS Intradomain Routing Protocol.
RFC1195: Use of Open Systems Interconnection (OSI) IS-IS for Routing in TCP/IP
and Dual Environments.
IGMP, DVMRP, PIM, and MSDP
Beau Williamson, Developing IP Multicast Networks, Cisco Press.
Dave Kosiur, IP Multicasting, Wiley Computer Publishing, 1998.
www.ebook-converter.com
Thomas A. Maufer, Deploying IP Multicast in the Enterprise, Prentice Hall, 1998.
RSVP
David Durham and Raj Yavatkar, Inside the Internet's Resource reSerVation
Protocol: Foundations for Quality of Service, John Wiley & Sons.
MPLS
Bruce S. Davie and Yakov Rekhter, MPLS: Technology and Applications, Morgan
Kaufmann Publishers.
Simple Network Management Protocol (SNMP)
Downloader
William Stallings, SNMP, SNMPv2,demo watermarks
SNMPv3, and RMON 1 and 2, Addison-Wesley,
1993.
QoS and DiffServ
31
1. Juniper Networks from the Internet to the Classroom
Kalevi Kilkki, Differentiated Services for the Internet, New Riders Publishing.
Zheng Wang, Internet QoS: Architectures and Mechanisms for Quality of Service,
Morgan Kaufmann Publishers.
Paul Ferguson, Geoff Huston, Quality of Service, John Wiley & Sons.
Frame Relay
Walter J. Goralski, Frame Relay for High-Speed Networks, John Wiley & Sons.
SONET
Walter J. Goralski, SONET, McGraw Hill.
Uyless Black, SONET & T1 Architecture, Prentice Hall, 1997.
ATM
David E. McDysan and Darren L. Spohn, ATM Theory and Applications, McGraw-
Hill, 1998.
www.ebook-converter.com
David Ginsburg, ATM Solutions for Enterprise Internetworking, Second Edition,
Addison-Wesley, 1999.
Point-to-Point Protocol (PPP)
James Carlson, PPP Design, Implementation, and Debugging, Second Edition,
Addison-Wesley, 2000.
32
1. Juniper Networks from the Internet to the Classroom
Chapter Summary
In this chapter, we have discussed the evolution of the Internet and how router
architectures have changed to meet the demand of services being offered, such as voice
and video. This chapter pointed out some of the problems associated with the past and
current architectures and the ability to provide IntServ. It also provided an overview of
some of the methods of supporting IntServ, such as RSVP and DiffServ. These, coupled
with MPLS, are playing key roles in traffic engineering. In addition, MPLS is being
expanded further and further, supporting both traffic engineering and VPN technologies.
This chapter also discussed Juniper Networks' product positioning and how the M-Series
fits in to the key core, edge, and mobile markets. The M160 is used predominately in the
ISP carrier core space, while the M40e is making its way into the edge market with its
added redundancy over the original M40. The J20 GGSN node, created through a joint
venture with Ericsson, and the G10 CMTS, offered through an acquisition, were both also
discussed. With these product offerings, Juniper Networks is able to focus on multiple
market segments and to evolve into other markets. The company's ability to position a
product and provide a reliable path of scalability and support makes it not only a leader
of current times, but likely to be a major innovator of the future.
Finally, this chapter discussed Juniper Networks' commitment to education and
www.ebook-converter.com
certification. With the expansion of its curriculum, Juniper Networks now provides
introductory and advanced course offerings. Specialized courses, such as Advanced
MPLS and Advanced VPN, further signify the company's commitment to providing
quality education for emerging technologies. In addition to its educational offerings,
Juniper Networks has a certification program that not only tests platform knowledge, but
internetworking theory as well.
Bibliography
www.ebook-converter.com
www.ebook-converter.com
www.ebook-converter.com
Physical layer—Layer 1, the physical layer, is the first layer and describes the set of
standards that convey the actual digital data. The data link layer sends a stream of
binary data to the physical layer that actually sends the 1s and 0s to the next device
along the route to the destination. Shielded wire, twisted pair, fiber, infrared, and
radio wave are all mediums in which devices can communicate on the physical layer.
When you plug a fiber cable into a port, the port is actually the start of the physical
layer.
Note
www.ebook-converter.com
The physical layer is one of the most important places to start troubleshooting.
Hours upon end can be spent troubleshooting networks because a cable or
connector was bent and not making contact. Standard troubleshooting
techniques involve starting at the physical layer and working your way up.
A device will communicate down the OSI stack, across the network, and up the OSI stack
of the receiving device. This process ensures that as information is manipulated on
leaving the sending device, those manipulations are equally copied in reverse order by the
receiving device. In Figure 2-2, the application layer sends information down through the
layers on PC A, across the network, to PC B, which will then send the information up the
OSI stack to the application layer on the receiver. Once the application layer processes
the data on the receiver, it can then be useful to the user.
www.ebook-converter.com
IP Suite
IP was originally developed by the U.S. government for research. The original IP
specification was four layers and was known as the DoD IP model after the U.S.
Department of Defense, which developed the Internet for U.S. government agency
communications. Owing to the widespread use of the model, it is known now as the
Internet Protocol Suite.
The four layers of the DoD IP model and how they map to the OSI reference model are
shown in Figure 2-3. Layer 4 of the DoD model is the application services layer and
represents all of the functions of the top three layers of the OSI model. Layer 3 of the
DoD model is the transport layer, which is responsible for the same functions of
acknowledgment and sequencing as the OSI third layer. Layer 2 of the DoD model is
Downloader demo watermarks
known as the Internet layer and is the responsible for IP addressing. Layer 1 of the DoD
model combines the physical and data link layers of OSI and is known as the network
access layer.
40
2. Networking Primer
www.ebook-converter.com
convey. The purpose of drawing this analogy is to show that as things change at Layers 1
and 2, the upper layer information stays the same. In this way, data can be sent across
various networks without being altered.
How does this model allow for layered separation and why the letter analogy? This is how
encapsulation works. Encapsulation is the process of taking one piece of data and adding
a front (header) and a back (trailer). This allows for different devices to use only those
layers they need through the process of chopping, packetizing, and framing the upper
layer data in a standard format. The following details how data would be transmitted
according to this analogy.
Layer 7—Application: A letter is written in a computer application (e.g., Netscape
Communicator or Microsoft Outlook).
Downloader
Layer 6—Presentation: A common demo
language and style watermarks
would have to be used.
Layer 5—Session: A standard envelope with a return receipt would be used. The
return of this receipt would acknowledge and end the mail sending process.
41
2. Networking Primer
Layer 4—Transport: If multiple pages were created, they would be numbered. If too
many pages for one envelope were drafted, then several envelopes could be used,
and they too would be numbered as 1 of 4, 2 of 4, and so on, so that the correct order
could be kept on the receiving end.
Layer 3—Network: A destination address and a sending address (the source) would
be added to ensure that the letter reached the correct individual and the receiver
knew whence the letter originated.
Layer 2—Data link: The envelope with the far end address would be put into a
mailbag for use on trucks.
Layer 1—Physical: The truck mailbag would be put on the truck and travel until it
reached the end of the truck's route.
Layer 2—Data link: The address envelope (Layer 3 packet or package) would be
taken out of the truck mailbag and put in an airplane mailbag.
Layer 1—Physical: The airplane mailbag would then be placed on an airplane and
continue on until it was ready to be transferred again to a truck, which would require
a truck-type mail bag.
www.ebook-converter.com
Just as in the analogy above, Layers 1 and 2 can be changed several or even many times
as the packet makes progress towards the destination. Once the destination has been
reached, Layers 3, then 4 can be stripped by the receiver and the return receipt signed
(Layer 5) to present the data to the reader, ending the communications channel. The
letter inside, the envelope, and the destination-addressing scheme are never altered by
the lower two layers' independent processes. The truck and the airplane transportation
are not affected by what is in the envelope. The Layer 3 address would be looked at to
forward the letter appropriately, but it would not be altered. This is the layer separation
that allows the different components to work together as long as the standards are
adhered to.
www.ebook-converter.com
Figure 2-4. Data Encapsulation
In the receiving stack each layer reads the necessary information for its particular layer,
strips that information off, and forwards the data upwards.
Network Devices
Different network devices were created to aid in the transmission of data at the different
layers. At the data link layer, bridges and switches are used. Bridges and switches work at
Layer 2. They can connect various physical media as long as the data link protocol is the
same. At Layer 3, the network layer, routers from companies such as Juniper Networks
Downloader demo watermarks
are used. Routers can connect different data link networks as long as they use the same
network layer protocol. Each of these devices forwards data based on the standards of
the layer on which they work.
Most network devices and technologies can be thought of as part of one of two groups,
43
2. Networking Primer
local or wide. Local-area network (LAN) devices usually connect users centered in a
close geographical area. These devices are usually switches or small-access routers.
WAN devices typically connect groups of LAN devices over long distances. For the most
part, a Juniper Networks router is a device that can connect groups of LANs and WANs
together. Since the OSI layers work together, different data link layers can be used to
forward a single type of network layer data. Going back to the example of the letter, the
envelope can travel in a truck, then an airplane, then in a truck again. The truck is used
locally and the airplane transports the letter across long distances.
So too can networking use different methods of transportation. It is very typical for data
to move from LAN to WAN to LAN in order to get from the sender to receiver. In Figure
2-5, there is a sender A and a receiver B. The data has to go through the LAN in
Washington D.C. to get to the WAN that will allow it to be transferred up the East Coast
WAN to the LAN in Boston. A Juniper Networks router connects the LAN to the WAN.
One port of the router is connected to the LAN and one is connected to the WAN. In
addition, the cloud representing the WAN could be made up of many Juniper Networks
routers in a network. Juniper Networks has developed a wide variety of ports, allowing
them the ability to forward data from and to LANs through WANs for many situations.
www.ebook-converter.com
44
2. Networking Primer
Bridges and Switches
A bridge is normally used to connect two groups of similar data link devices, such as PCs
on Ethernet. A bridge can divide an overloaded LAN network in two groups, managing
the communications between them. This allows the LAN to continue to function
seemingly as a single group. As the LANs get larger, more ports are needed on a bridge to
divide the LAN into more groups. Eventually each data device is able to have its own
port; the bridge is then called a switch because it switches data between the ports. A
switch greatly increases a LAN's communication efficiency. Every device has its own
port—it's own private connection. With every device having a dedicated, rather than a
shared, connection, a device is able to send and receive more data through LANs and
ultimately through WANs. The switch can manage the communication between LAN
devices much more quickly and efficiently than the devices themselves when all of them
are essentially trying to talk at the same time.
Note
A bridge that connects dissimilar data link devices is called a translational
bridge and one that connects similar data link devices is properly called a
transparent bridge.
www.ebook-converter.com
Other types of switches operate in the WAN. These use protocols like ATM or frames
from a Frame Relay network. These are the types of switches in the middle of large
networks to which Juniper Networks routers are connected in order to pass data.
Routers
Routers work at the network layer. They look at the destination address of the IP packet
and forward the packet in the right direction. Juniper Networks routers can connect
different types of LANs and WANs. In addition, Juniper Networks routers can connect
different types of WANs together on a very large scale. In Figure 2-6, a Juniper Networks
router takes in a frame from the Layer 2 data link LAN protocol (2L), then strips off the
Layer 2 LAN information to look at the Layer 3 network information. The Layer 3
Downloader demo watermarks
information must be looked at to determine where the data must be sent, but it is not
manipulated or changed; it is merely observed. This is called a Layer 3 lookup because
the device is looking at the Layer 3 protocol address to determine the correct path to
forward it upon. Higher-layer information is usually not looked at. The router then
45
2. Networking Primer
decides in which direction (out of which port) to forward the information, changes any
Layer 3 information needed (e.g, TTL), adds Layer 2 WAN (2W) information,
encapsulates the packet, and the router sends the data on its way.
Transmission Technologies
The last section gave an overview of where a Juniper Networks router fits into the
scheme of a network; this section will discuss those LAN and WAN technologies at
Layer 2 that connect the routers to each other. As you learn to configure a Juniper
www.ebook-converter.com
Networks router in Part III, you will see it is best to configure the network by the layers
up the OSI model (starting at Layer 1 and moving upward through the layers). Starting at
Layer 1, the physical layer, if the cable or fiber is not plugged in or is plugged in
incorrectly at the physical layer, nothing else will work no matter how well it is
configured. If Layer 2 is not working properly, then Layer 3 will not communicate. This
is why even though routers work primarily at Layer 3 to forward packets, it is important
to know what is happening at the data link layer as this is the layer that the network
packets will flow across. After the physical layer is connected, the data link layer is
configured next. After the data link layer, the network layer addressing is assigned. That
is where the power of a Juniper Networks router resides, in its ability to forward IP
packets.
Data link protocols can be grouped into two categories: LAN and WAN protocols.
Originally, the difference between LAN and WAN technologies had to do with the
Downloader demo watermarks
distance the protocols could cover geographically. With advances in technology, that
distinction is no longer as clear. Ethernet is an example of a broadcast protocol (LAN),
while Frame Relay, ATM, PPP, and High-Level Data Link Control (HDLC) are
examples of nonbroadcast protocols (WANs).
46
2. Networking Primer
LAN Protocols
Originally, data devices were connected directly to each other. This created a mess
quickly because as more devices wished to speak to each other, each would have to add
connections for all others. Ethernet is a standard LAN protocol that allows more than two
users to be connected to the network at the same time. As seen in Figure 2-7, five devices
are connected to the same Ethernet link. This allows all the devices to hear whenever any
device talks. Think of a hallway with five people standing in doorways. If one wishes to
talk to another three doors down, everyone else will hear him or her at the same time.
This is called a broadcast-type network protocol. When host A sends out data, every
device on the link will receive and look at it to determine if it is the intended receiver. If
not, it will discard the data.
www.ebook-converter.com
www.ebook-converter.com
transmission was received to ensure that no matter where B is, it will receive the
transmission (in this case the bridge would forward that data to collision domain B).
www.ebook-converter.com
Ethernet device will listen for a carrier before sending to ensure no one else is using the
network. In this way, many stations can access the network. If a collision is detected, the
devices whose traffic collided send a blocking signal to ensure that everyone realizes that
a collision occurred and waits a certain amount of time, plus a small random amount,
before retransmitting. The random amount of time added to the specified time keeps two
devices that have collided from recolliding.
Regular Ethernet typically runs at 10Mbps, or 10 million bits every second, and is usually
transmitted over unshielded twisted pair (UTP), such as Category 5 cabling. In a
nonbridged environment, every device in a collision domain on the Ethernet has to share
the 10Mbps. In a desktop switching network, every (or at least most) devices will have
their own 10Mbps Ethernet connection directly connected to the switch, which reduces
the collision domain, but since every device can still receive all other's broadcasts, all are
Downloader demo watermarks
still all in the same broadcast domain. A switch has a backplane (sometimes called a
switch fabric) through which data passes when it has been received in one port and must
be forwarded out another.
The Ethernet protocol uses addresses in the Layer 2 frame to send and receive data. This
49
2. Networking Primer
Layer 2 addressing is called the MAC address. This is a 48-bit address that uniquely
identifies the device on the network. On Juniper Networks interfaces these are called
hardware addresses and are written in a hexadecimal format, such as
00:90:69:9e:80:00. These addresses are usually hard-coded at the factory into the
Ethernet card and are often burned in to the network interface card (NIC), so they are
sometimes also known as burned-in addresses (BIAs).
Figure 2-9 shows an Ethernet frame separated into fields. The parts of an Ethernet frame
are used to deliver the frame to the receiver, allow the receiver to know which device
originated the frame, and to ensure that the frame arrived intact.
The 56-bit preamble field lets the receiving device know that an Ethernet frame is
coming. The preamble consists of alternating 1s and 0s.
The 8-bit start of frame delimiter (SFD) field tells the receiver exactly where that
frame starts by ending in two 1s.
The 48-bit destination IP address (DA) is the destination MAC address of the
destination Ethernet device.
The 48-bit source IP address (SA) field is the source MAC address of the device
sending the Ethernet frame.
www.ebook-converter.com
The 16-bit length field describes the length of the data in the frame. Older protocol
implementations had a type field for what type of data was in the frame. There are
several older implementations of Ethernet that were developed before the IEEE
drafted the standard.
The variable data field carries the Layer 3 packet and upper-layer data. The entire
Ethernet frame has to be a minimum of 64-bytes long. If the data field is so small that
the whole Ethernet packet will come in under this size, it must be padded to get it to
64 bytes total. The maximum size for the data field is 1,500 bytes.
Finally, the sending device creates the 32-bit frame-check-sequence (FCS) field by
running an algorithm on the bits of the frame. This produces a binary number that is
Downloader demo watermarks
added at the end of the frame as the check sequence. As the receiver reads the frame,
it runs the same process and comes up with a number that should match the FCS. If it
does, then the frame has not been scrambled or corrupted during transmission.
50
2. Networking Primer
Note
Most end-stations, like workstations or servers, are half-duplex by default,
whereas most switches and routers will either attempt to autonegotiate or be set
to full-duplex by default. It is usually best just to set what you wish to ensure
both sides of the link are set alike.
Since every device can hear a broadcast from any device in that broadcast domain, an
www.ebook-converter.com
easy way for a station to learn the Layer 2 MAC address for a destination Layer 3 IP
address is to broadcast a request for the owner. If you are device A and you have data for
a Layer 3 address B, but you don't know the Layer 2 MAC address for B, you simply
send out a broadcast Ethernet frame to everyone asking who owns Layer 3 address B and
what its Layer 2 MAC address is. Device B sends the proper MAC address, and now A
can send data across the physical link with the appropriate Layer 2 destination address.
This process of broadcasting to all stations in a broadcast domain for a particular Layer 2
address is called Address Resolution Protocol (ARP). It allows a sending device to find
out what the Layer 2 address is for a Layer 3 destination.
But what happens if the device determines that the Layer 3 address is not within the
broadcast domain? To determine whether or not a Layer 3 address is in the broadcast
domain, the source device sees if the destination address is within the range of the local
broadcast domain. An administrator has configured a router to allow the forwarding of
Downloader demo watermarks
data out of the network. The router in this case is known as a default gateway or gateway
of last resort. Once the device determines that the destination host is not in the broadcast
domain, it will send an ARP request to the router. The router is where a device sends data
that is destined for a nondirectly connected network to allow the router to pass the data
51
2. Networking Primer
to another network.
Fast Ethernet
Sometimes the flow of data can cause bottlenecks at areas of congestion. Giving all the
devices on a network a full 10Mbps sounds like a good idea at first, but this can overload
connections that many devices try to access at once. Even if five users trying to send data
to the same server all have 10Mbps connections, the server can only receive at a rate of
10Mbps no matter what. The connection to the server would be a bottleneck. Another
common bottleneck can occur when many users on a switched 10Mbps Ethernet
connection are trying to send or receive information through one router or other single
exit point on a network. For example, everyone arrives at work in the morning and the
first thing they wish to do is check their e-mail, as shown in Figure 2-10.
www.ebook-converter.com
Gigabit Ethernet
www.ebook-converter.com
Gigabit Ethernet is primarily run on fiber. With a speed of 1,000Mbps, this is a LAN
protocol suited to use between network devices where high bandwidth is needed. As a
100Mbps connection can alleviate bottlenecks from the end-stations for many 10Mbps
connections, so can Gigabit Ethernet alleviate bottlenecks caused by too many 100Mbps
connections accessing the same end-stations.
This covers the Ethernet protocol group and its various speeds. Next is the group of
WAN protocols and their specifics. These are the protocols that are primarily used to join
LANs or groups of LANs together over large geographic distances.
WAN Protocols
WAN technologies were developed to cross very large geographical distances. Originally,
Downloader demo watermarks
this might have applied to long-distance telephony. An early example of a WAN would
have been the connections that linked two small towns' switchboards. These towns'
switchboards were local for themselves, but were required to make connections across
distances to pass information. This section describes the modern protocols used to
53
2. Networking Primer
transfer data across great distances.
WAN Technologies
The telephone is one of the earliest methods of using a network to pass information. The
circuits were set-up manually by an operator switching the connections together. One
circuit was required for each conversation, and the wire could only hold that one
conversation.
Once the telephone companies digitized voice telephone circuits, multiple conversations
could then be combined on a single wire. This process, called multiplexing, greatly
increased the numbers of circuits that could be transmitted on the available wire that
connected the large telephone switches. Instead of requiring a single set of wires for each
circuit, now one set could run many circuits simultaneously.
From this new development came a specific process for multiplexing digital circuits. It
based the mixing of different circuits on timing. Each circuit had a place in the stream of
1s and 0s and could take its turn having data sent. As long as both ends agreed on the
timing, the sending device and the receiving device would know which bits belonged to
which circuits. This is known as time division multiplexing (TDM). In Figure 2-12,
modem 1 is mixing the bits of circuits A, B, and C in a specific order using TDM. As long
www.ebook-converter.com
as modem B, on the right, is correspondingly configured, it knows which bits belong to
which circuits and can separate and demodulate them appropriately back to separate
circuits.
DS Hierarchy
Further developments of the TDM standard led to a full digital hierarchy in frastructure in
www.ebook-converter.com
America. Voice circuits are generated 8 bits at a time that are sampled 8,000 times per
second, for a constant 64,000-bps circuit, or 64Kbps (1,000 bits = 1 kilobit).
This digital hierarchy allows 64Kbps circuits to be multiplexed in greater numbers in a
scalable manner. The 64Kbps circuit became the standard and was named a digital
stream-0 (DS-0) to represent the base circuit. To allow the standard multiplexing of many
DS-0s, a digital stream (DS) hierarchy was implemented in North America.
When 24 DS-0s were multiplexed together, they created a DS-1. When DS-1s were no
longer sufficient to handle the number of circuits required, 28 DS-1s were combined to
create a DS-3. This ability to combine groups of circuits in great numbers allowed the
TDM networks to grow at rapid rates. Globally, a DS hierarchy was implemented on the
same DS-0, but on different multiplexed levels. The two most common DS hierarchies are
the U.S. standard and the worldwide standard (sometimes called E standard) listed in
Downloader demo watermarks
Table 2-1.
Table 2-1. DS Hierarchies
55
2. Networking Primer
Mutliplex LevelNumber of DS 0sImplemented Bandwidth
DS-0 1Worldwide 64Kbps
DS-1 24United States 1.544Mbps
E-1 30Outside United States 2.048Mbps
E-3 480Outside United States34.368Mbps
DS-3 672United States 44.736Mbps
Due to the fact that the TDM networks were, at the lower level, the same 1s and 0s that
data networks used, devices were created that allowed data networks to call one another
just as people do using the phone: No modem was needed. A network administrator could
install a DS-0, several DS-0s, or a DS-1, depending on the requirement. This allowed
local networks to connect to each other over a wide area. Now, companies with LANs in
different geographic regions could have fast digital connections between them.
There is a disadvantage to circuit-switched networks, however. When a connection is
brought up, even if not much data is being passed, the full bandwidth is taken for that
particular connection. When a DS-0 connection is made, all 64Kbps is reserved for that
connection, even if it isn't being used. There was a need for a type of connection that
used only the bandwidth required or allowed traffic to multiple end points at once. This
type of network needed to switch the actual packets instead of the entire circuit.
www.ebook-converter.com
Frame Relay
A technology was developed that allowed one port on a device to have connections to
more than one destination device at the same time. The technology splits the physical
port, or interface, into logical multiple interfaces that can have different Layer 3
addresses as if they were physically separate. The data for a particular destination that
had been streamed in a specific timeslot would now be bundled in a packet. This allowed
the packets themselves to be switched between destinations. Frame Relay is a
nonbroadcast multiaccess (NBMA) technology. NBMA is considered nonbroadcast, for
two reasons:
1. A device cannot send to all the other devices on a particular network at once with a
single Layer 2 broadcast address.
Downloader demo watermarks
Multiple access means that each device can access more than one device on the same
2.
network.
56
2. Networking Primer
Unlike an integrated services digital network (ISDN) circuit, Frame Relay allows one
physical connection to a WAN switch to have multiple Layer 3 addresses. NBMA
technology allows the splitting up of the physical layer interface into logical or virtual
data link layer units with different Layer 2 and Layer 3 addresses for each. The different
Layer 2 addresses are needed so that the WAN switch knows in which direction to switch
the frame.
Not every station on an NBMA network can be sent to at once; only those in which there
is a connection set up through the WAN switches can. In the header of the frame, there is
an identifier to allow the switch to forward the frame in the appropriate direction. Figure
2-14 shows an example of an NBMA network. Router A puts a Layer 2 identification
(ID) number of 25 on any frame to go to router B and of 33 for any frame to go to router
C. The switch node has a table that merely says: Any incoming ID 25 on Port 0, send out
Port 1, and any incoming ID 33, send out Port 2. In this manner, router A has access to
multiple devices with one physical connection, but cannot broadcast to both at once.
These connections to the other routers are called virtual because they are not real. The
routers act as if they are connected to each other, but in fact are connected to the switch
node.
www.ebook-converter.com
www.ebook-converter.com
www.ebook-converter.com
SONET/SDH
In the TDM-standards arena, the DS standards evolved in North America (and Japan),
and the E standards evolved in Europe, then spread throughout the rest of the world. In
the optical-transmission arena, there are also two main standards: SONET was developed
in the United States while SDH was developed for international use. These are two very
similar physical standards for transmitting digital bits by light over fiber-optic cable.
When the copper-based TDM networks at the DS-3 speed were demanded more by end
users, a faster multiplexing scheme had to be implemented, one that could scale to much
greater speeds than electric pulses over copper. In addition, the new multiplexing scheme
would have to go further and be more flexible in inserting and dropping DS circuits. At
the time, to drop one DS-0 and add another to a DS-3 required that all of the DS-1s could
be separated (even if there was only one that needed to have a circuit inserted). An add-
drop multiplexer (ADM) was developed to allow a particular timeslot's data to be
removed and another's inserted in its place without the entire infrastructure having to be
www.ebook-converter.com
split apart and remultiplexed.
SONET was developed to carry multiplexed DS circuits. The SONET architecture is built
around a synchronous transport signal (STS). The STS is the electrical framing component
that is then transmitted into an optical signal called an optical carrier, or OC. Since
SONET is based on the TDM voice-circuit standards, the frame has to be sent 8,000
times a second to maintain DS hierarchy compatibility. This was extremely important
because SONET was first used primarily to multiplex ISDN circuits. Since the DS-0 is 8
bits sampled 8,000 times per second, SONET transmission had to match that for
consistency.
The STS-1 is built around the user data called a synchronous payload envelope (SPE).
The STS is broken into nine columns of 90 bytes for a total of 810 bytes. The
Downloader demo watermarks
transmission of 810 bytes at 8,000 times per second gives the base STS-1 a speed of
51.84Mbps. Out of 90 bytes in the column, there are a total of 3 bytes per row of header
information. Figure 2-17 shows the STS-1 and SPE format.
60
2. Networking Primer
PPP
PPP is another Layer 2 protocol only used for point-to-point connections, which is why it
is called the Point-to-Point Protocol. This protocol also had earlier roots. Originally,
Serial Line Internet Protocol (SLIP) was used in the earlier days of dialing into a device
with a modem. SLIP was not a very good protocol; it had no error detection, only
supported limited Layer 3 protocol implementations, and required complex IP
configuration before connecting.
PPP was then created and implemented (RFC 1331 www.ietf.org) as people started to
use modems and computers to connect into networks. If you wished to dial into different
networks, you did not wish to have to change your network configuration every time.
PPP allows for dynamic address assignments and Layer 3 protocol connection, increased
Layer 3 protocol support, error detection, encrypted authentication, and many other
www.ebook-converter.com
features. Most of the advanced features of PPP are used for the massive dialup
networking systems of ISPs or corporate networks. These advanced features can include
automatic IP address, default gateway, and subnet mask assignments after negotiating the
initial connection. PPP can be used on routers for the negotiation and error-detection
features. One of the best features of PPP is that because the negotiation has to take place
to bring up a connection, that is a perfect time to do authentication if you wish to
password some of the connections on your routers. The main thing to know about PPP is
that it is also a Layer 2 encapsulation alternative to HDLC and Frame Relay and that it is
the default interface encapsulation for T1/T3, E1/E3, and SONET Juniper Networks
routers.
PPP, HDLC, and Frame Relay are Layer 2 encapsulation types for POS. SONET can also
be used for TDM multiplexing, but how does one get the best of Frame Relay's dynamic
Downloader demo watermarks
bandwidth capabilities and a circuit-switched network's (CSN) ability to grant high-
quality service together with the speed of SONET? A technology was developed based on
cells. These switched cells were switched like a packet, but were much smaller to allow a
switch to minimize the delay as it switched them through the switch fabric. Instead of
having a connection take the full bandwidth available, even if not using it, as
64
2. Networking Primer
synchronous networks did, this technology would allow dynamic bandwidth allocations
based on priority and was therefore named asynchronous.
ATM
As companies grew, they were faced with ever growing separate voice and data
networks. Large DS hierarchy voice-line infrastructures were installed next to large PSN
data networks. There surely had to be a way to combine the two, but there were problems
with combining these completely different types of information.
Voice connections are very sensitive to delay, but are not necessarily sensitive to
accuracy. If several bits of a voice conversation were lost, chances are they wouldn't be
noticed unless the problem grew too large. If, however, some of the bits were delayed,
then accelerated, then delayed, the conversation would become garbled.
Data transfers are sensitive to accuracy, but not necessarily to delay. A file being
transferred could be rendered unusable if even only one packet were missing, but it
wouldn't matter too much if the transfer were undergoing the same
acceleration/deceleration as a voice call. However, data usually requires a much higher
data transfer rate to move large files or it would not be considered productive.
Unfortunately, these data transfers that require high data rates can clog points through a
www.ebook-converter.com
network, causing delay.
How do you keep the data transfer traffic from hogging all of the connection bandwidth
to allow the delay-sensitive traffic some room to traverse the network unhindered? This is
where ATM comes in. ATM was developed as a combination of ISDN and Frame Relay.
This allows ATM the features needed to carry both delay-sensitive traffic and high data-
rate traffic at the same time on only one network. ATM is another NBMA technology.
The two main virtual connections of ATM are PVCs and switched virtual circuits (SVCs).
ATM PVCs are similar to the PVCs in Frame Relay. They are up all the time at a specific
bandwidth. SVCs, though, are demand connections: They are only created when needed.
They are connected when needed and disconnected when not. For detailed information
on ATM standards, visit www.atmforum.com.
ATM has a physical interface that is split into virtual paths. Each path can then be
divided up into virtual channels. If a router has multiple PVCs on one interface to other
routers, the rest of the ATM network has to differentiate which data belongs to which
PVC so the ATM network devices can accurately forward the data. A PVC is identified
by the numbers that make up the path and channel. This path-channel pair makes an
identification that is unique on the ATM connection between the router and the switch or
from router to router. These identifiers for paths and channels are known as virtual path
identifiers (VPI) and virtual channel identifiers (VCI).
In Figure 2-19, three ATM interfaces are shown with logical paths and channels. Each
path and channel has an associated ID to differentiate data for one destination from
another, similar to a Frame Relay DLCI. The large left ATM interface has four virtual
channels assigned. Path 57 has virtual channel IDs of 39 and 40, which would be written
out as 57.39 and 57.40, respectively. Also on the left interface is path 68, which has VCI
37 and 38, which would be written out as 68.37 and 68.38. Both of the smaller right
interfaces have a path 68 configured. A VPI/VCI pair only has to be unique for that
interface.
www.ebook-converter.com
Figure 2-19. ATM Paths and Channels
The ATM switch has a switching table mapped for all the paths and channels for all the
ports. The PVCs through an ATM switch are manually configured either directly by an
administrator or through management software. This is the manner in which data is
passed switch to switch from the entry point of an ATM network to the exit through a
PVC. VPI 0 and VCI 32 and under are reserved for specific ATM functions—do not use
these VPI/VCI pairs.
www.ebook-converter.com
ATM traffic can be given different priorities for leaving an interface. If many devices try
to send to destinations on the other side of an ATM connection, a bottleneck can occur.
This can create a situation where some data gets through and some doesn't. ATM circuits
can be assigned priorities that assure that intended higher priority data gets sent. When
the higher priority connections aren't fully using their assigned bandwidth, lower priority
connections can use it.
ATM can emulate TDM circuits like DS-0s, T-1s, or E-3s. This allows TDM connections
to be mapped across an ATM network. This is known as circuit emulation. Internet data,
such as e-mail, FTP, and Web pages, can also be transferred across an ATM network.
This type of data is known as best-effort. Internet-type data originally had no assurances
of being received at the destination if problems of congestion were encountered along the
way.
Downloader demo watermarks
A problem arises with the two different ways that TDM and best-effort handle data
traffic. TDM is based on a constant bandwidth speed requirement. Best-effort data is
usually bursty, which is to say that it has peaks (high usage) and valleys (low usage) of
67
2. Networking Primer
bandwidth usage. ATM has controls to allow both types of data to be transmitted on the
same network and to apply extra bandwidth to the lower-priority data when the higher-
priority data is not using it.
Circuit emulation technology requires a PVC with a constant bit rate (CBR) profile. A
profile is a service category that allows ATM traffic to be treated differently. The CBR is
set based on a steady stream in bits per second on data and has the highest priority.
Variable bit rate (VBR) profiles allow for a steady sustained cell rate (SCR), but also a
higher bit rate that can be burst up to for a specific time period, known as the peak cell
rate (PCR). Bursting is the situation when an inordinately large group of cells is sent at
once. The VBR profile has second priority after CBR. Internet-type data uses a profile
called unspecified bit rate (UBR) because of the varied bandwidth requirements. There is
no specified bandwidth at all. UBR has the lowest priority and gets whatever is left over
after the CBR and VBR profiles have made their claim to the port. In Figure 2-21, the
port traffic profile structure is illustrated with the two CBR PVCs ensuring their needed
steady rates, then one VBR PVC getting the middle bandwidth, and any UBR traffic
getting whatever is left over. The CBR 1 and 2 are both configured for 15Mbps each; the
VBR has a sustained rate of 25Mbps with a peak of 10Mbps above the SCR; the UBR
gets the remainder.
www.ebook-converter.com
Figure 2-21. ATM Profiles with Constant, Variable, and Unspecified Bit Rates
Remember how ATM sends its data across a network in cells. As Frame Relay used
frames at Layer 2, ATM uses cells with the VPI/VCI addressing in the header. The cells
Downloader demo watermarks
are extremely small to allow for low delay (called latency) with mixed traffic types when
bandwidth is limited.
The Cell
68
2. Networking Primer
The ATM cell is the standard unit used for transmission across an ATM network and is a
total of 53-bytes long: 5 bytes of the ATM cell are used for addressing and header
information, and 48 bytes of the cell are used for the payload of data. All ATM cells are
53-bytes long, allowing for consistency of transmission throughout the network.
Sometimes when a Layer 3 packet is segmented to fit into the ATM cells, it doesn't
completely fill the last cell. This cell has to be completed with padding. Padding is filler
that doesn't mean anything, but is used to ensure the cell is the proper size.
ATM cells come in two different types: user-network interface (UNI) and network node
interface (NNI). UNI is a specification for the communications between an end device
(such as a router) and an ATM switch. NNI describes the communication specification
between ATM switches themselves. Figure 2-22 shows the make up of an ATM UNI cell.
The 4-bit generic flow control (GFC) field is currently undefined and is set to all 0s.
The 8-bit VPI field identifies which path the cell is assigned to.
The 16-bit VCI field in the header identifies which channel the cell is assigned to.
The 3-bit payload type (PT) field informs the receiving device of whether the ATM
cell is carrying data to be transferred or administrative messages for the device.
www.ebook-converter.com
The 1-bit cell loss priority (CLP) field allows an ATM switch during times of
congestion to drop cells with this bit set to 1 (lower-priority) before cells with this bit
set to 0. This bit is sometimes called congestion loss priority.
The 8-bit header error control (HEC) field allows the receiver to ensure that the
header has been received correctly. A computation is run on the header, allowing the
correction of 1-bit of error to the header or the detection of more than 1-bit of error.
CCCs
Switching a frame is usually faster than forwarding a packet. A switch just has to look at
a Layer 2 header, where as a router has to look at a Layer 3 header. CCC, or circuit cross
connect, is the name of the feature set that allows a Juniper Networks router to perform
Layer 2 forwarding instead of Layer 2. In one instance, CCC functionality covers the
www.ebook-converter.com
Layer 2 label switching required in MPLS-enabled networks. MPLS is a large-scale core
networkwide implementation of routers acting like switches. MPLS is described in the
next section.
Another type of Layer 2 switching that Juniper Networks implements is used on a single
device for smaller-scale operation. This smaller-scale functionality is usually called CCC
as well and refers to functionality similar to a network switch, even though the term
officially describes all the Layer 2 switching functions.
CCC can switch between similar Layer 2 protocols. ATM in can switch to ATM out, and
Frame Relay can only switch to other Frame Relay. CCC can be configured on logical
interfaces and can switch packets to other similarly configured logical interfaces
(configuring CCC is discussed in Chapter 12).
www.ebook-converter.com
the contract between the provider and the customer.
IP
The most widely deployed version of IP is version 4, or IPv4, and that is the version
discussed here. IPv6 is available in JUNOSv5.1, but it is beyond the scope of this book.
IP is implemented at the network layer, which is the third layer of the OSI model. As a
packet travels from LAN to WAN to LAN, the different Layer 2 in formation is stripped
and replaced as it travels through routers. The destination IP address is not affected. The
router has to use the IP address to determine in which direction to forward the packet.
Each device on connecting networks has to have a unique IP address. IP networked
www.ebook-converter.com
devices can be grouped by IP addresses that are close to each other so a router can
forward a packet toward a range of addresses that gets smaller until the packet arrives at
the destination.
Because network devices actually transmit and receive in 1s and 0s of binary language, it
is important to know how to find your way around this numbering scheme. IP addressing
is usually written everyday for us mere mortals in decimal to allow easy comprehension.
But when it comes to manipulating IP addressing and groups of IP addresses representing
a network, you do need a basic understanding of binary numbering.
www.ebook-converter.com
To convert 189:
Subtracting 128 leaves 61 (the 128 represents a 1 in the eighth bit)
64 cannot be subtracted (this is a 0 in bit 7)
Downloader demo watermarks
Subtracting 32 from 61 leaves 29 (a 1 in the sixth bit)
Subtracting 16 from 29 leaves 13 (a 1 in the fifth bit)
Using the preceding procedure, the binary for 189 is shown in Figure 2-26. A network
address of 10.10.150.240 can be represented in binary as
00001010.00001010.10010110.11110000.
www.ebook-converter.com
With four bytes of addressing space in an IP address, a subnet mask can be as large as a
/30, indicating that the address is for two devices on a point-to-point link. A single host
address would be a /32. When the binary is written out for a subnet mask, bits are
counted from left to right to indicate what portion is used for the network. The binary can
be written out broken into four groups of 8-bits each as shown in Figure 2-27.
75
2. Networking Primer
Figure 2-28. Sample Binary Subnet Mask with 24-Bit Address
In the network mask in Figure 2-28, the network could have 256 potential host numbers,
0 to 255. 172.20.10.0/24 would range from 172.20.10.0 to 172.20.10.255.
The first number in a range is always used to identify the network as a whole. The last
number of the network range is used to broadcast to all the hosts on that network (called
a directed broadcast). Since these two numbers cannot be used for hosts, then the two
addresses must be subtracted from the pool of 256 available addresses leaving 254
available host addresses.
The subnet mask can also be represented in decimal. Converting the address in Figure 2-
28 from binary would give a subnet mask of 255.255.255.0.
Subnetting
If a network administrator is to use the range of IP addresses assigned efficiently, the
addressing range must be manipulable for different network implementations. For an
office of 100 to 200 people, a /24 might be the appropriate network mask for that
network, but what if it was a small office with only 20 to 40 people? Then there would a
large number of wasted IP addresses in that range. VLSM allows for breaking a very
large network range down into several parts as needed. If smaller networks are needed,
www.ebook-converter.com
then those parts can be broken down even further.
If a new company wishes to implement an IP addressed network, it can request a block of
addresses from its ISP. For this example, the ISP gives the company 10.10.0.0/21.
This range is from 10.10.0.0 to 10.10.7.255. The subnet mask of /21 in Figure 2-
29 denotes one network with 1,000 or more host numbers. The 1s in the mask represent
the network bits and the 0s are the bits available for host addresses.
www.ebook-converter.com
The subnet mask is 11111111 11111111 11111100 00000000
This can be achieved because the 10.10.0.0/22 range includes the 20-second bit as
either a 1 or a 0 because it is not part of the mask.
To split the 10.10.0.0/22 once more into /23s, the following would occur.
10.10.0.0/23 is represented as 00001010 00001010 00000000 00000000
The subnet mask is 11111111 11111111 11111110 00000000
10.10.2.0/23 is represented as 00001010 00001010 00000010 00000000
The subnet mask is 11111111 11111111 11111110 00000000
Downloader demo watermarks
This process can be used many times to reduce the size of the network to create a range
suitable for most purposes. If two routers are to be connected together with a point-to-
point connection, the very small network between them only needs four addresses: the
network number, the two router addresses, and the broadcast address. This would be
77
2. Networking Primer
represented as 10.10.0.0/30.
10.10.0.0/30 is represented as 00001010 00001010 00000000 00000000
The subnet mask is 11111111 11111111 11111111 11111100
10.10.0.4/30 is represented as 00001010 00001010 00000000 00000100
The subnet mask is 11111111 11111111 11111111 11111100
For the network address 10.10.0.0, the two host addresses are 10.10.0.1 and
10.10.0.2. The broadcast address is 10.10.0.3. The next contiguous (adjacent or
next in line) /30 network is 10.10.0.4/30. The last digit of the network address is
increased by one to find the next contiguous network (bold above).
Aggregation
As the networks are broken down using the subnetting bits, many subnetworks will be
created. Routers have to tell each other about these subnetworks. Too many subnetworks
can take up a lot of time and bandwidth. In addition, keeping track of all of these
networks can put a heavy processing load on the routers. In the same binary manner that
www.ebook-converter.com
larger network blocks can be subnetted to create smaller blocks, smaller blocks can be
aggregated to form a larger network assignment. This is important when routers tell each
other about the networks that they know about (called advertising). Instead of many
advertisements, if networks are aggregated together, there may need to be only one
advertisement.
Aggregation is achieved by moving the mask bit to the left, which reduces the number of
1s in a mask, creating a larger network range of host addresses.
10.20.2.0/24 is represented as 00001010 00010100 00000010 00000000
10.20.3.0/24 is represented as 00001010 00010100 00000011 00000000
The common subnet mask is 11111111 11111111 11111110 00000000
Downloader demo watermarks
Figure 2-30 is an example of aggregation. If router B were to inform router A about the
existence of its two attached networks, router B would advertise both networks as /24s
to router A. Router A would have two entries for router B's attached networks. If router
B were to aggregate the two networks into a larger advertisement, then router A would
78
2. Networking Primer
only have to receive one entry (10.20.2.0/23), which would encompass both
networks, instead of having to receive each /24 network individually.
www.ebook-converter.com
The IP Packet
The IP packet header contains information needed to transport the data from one host to
another on a best-effort basis. IP has no mechanism itself to ensure that the packet is
delivered. These functions are in different layers. IP header information primarily
consists of address and fragment information. In the event an IP packet has to be
fragmented, there has to be enough information to allow it to be defragmented at the
appropriate time in its entirety. Different network types use different packet sizes. If an
IP packet passes through a network that uses smaller packet sizes, the IP packet can be
broken into fragments. An IP packet header has 20 required bytes and can have more if
optional fields are used. Figure 2-31 is a representation of the required fields and the two
last optional fields.
Downloader demo watermarks
Figure 2-31. The IP Packet Header Fields
79
2. Networking Primer
The 4-bit version (V) field informs the receiver of the version of IP being used. As stated
earlier, the most common version is IPv4.
The 4-bit IP header length (IHL) field describes the header length in 32-bit words (how
many groups of four bytes are in the header). This is important if the optional fields are
used so the receiver knows where the header ends and the data starts. The minimum is
five (5 × 4 is 20 bytes minimum IP header).
The 8-bit ToS field informs routers of precedence, delay, or service required. Speed
(minimum delay) can be requested over reliability and so forth. ToS bits are used in
DiffServ, allowing an administrator to configure different treatment of packets based on
the ToS bits.
The 16-bit total length (TL) field represents the total length of the IP packet.
The 16-bit ID field aids in defragmenting packets. If packets need to be fragmented in
transit, this ID can ensure that the receiver knows which fragments belong to which
packets.
The 3-bit flags (F) field informs a router if the packet can be fragmented.
www.ebook-converter.com
The 13-bit fragment offset (FO) field indicates where in the full packet a particular
fragment fits. The first fragment would have an offset of 0.
The 8-bit TTL field is decremented every time it is forwarded by a router. It has a
maximum value of 255, allowing it to traverse 255 routing devices before it reaches the
destination. When the TTL reaches 0, the packet is dropped. This keeps undeliverable
packets from endlessly circling the Internet.
The 8-bit protocol (P) field indicates the next upper-layer protocol used in the datagram.
The 16-bit header checksum (HC) field represents the check on the packet header only.
Since the packet header will change at every hop (decrementing TTL) towards the
destination, this has to be looked at every time the packet is forwarded.
80
2. Networking Primer
The variable-length options (OPT) field can be used for control, measurement, source
routing, and time stamping, among other things.
The variable-bit padding (PAD) field is added if needed to ensure that the header ends
after a 4-byte boundary. This will allow the TTL field to be accurate since it counts the
number of 4-byte groups in the header.
www.ebook-converter.com
agree on the terms of transmission. These terms can be negotiations of such factors as
how many packets are sent before an acknowledgment.
Though video or music broadcasts on the Internet don't require perfect accuracy, they
require orderly transmission. UDP packets are connectionless and are just sent out
without the sender knowing if they are received. If a packet here and there is dropped or
corrupted, it won't affect the overall quality of the data being sent. This is an advantage
over TCP, which is connection-oriented. TCP would have the sender resend a packet that
was dropped. This could make an audio or video transmission worse than if the packets
were just lost. Order is more important than accuracy.
TCP and UDP use the same port numbers to distinguish which of the upper-layer
protocols the information is destined for. For example, FTP uses port 21, Telnet uses port
www.ebook-converter.com
The 32-bit acknowledgment number (AN) field is the next sequence number that should
be expected to be received.
The 32-bit data offset (DO) field is similar to a header length field. It describes where the
header ends and the data starts.
The 6-bit reserved (Res) field contains 6 bits all set to 0. They are for future use.
The 8-bit control (Co) field controls the connectivity between the sender and receiver.
These bits can inform the receiver that there is no more data from the sender, or either
device can reset the connection with these bits.
The 16-bit window (Win) field identifies the number of bytes starting with the byte in the
Downloader demo
acknowledgment field that the sender will accept.
watermarks
The 16-bit checksum (Chk) field is the result of a checksum being run on the header and
data.
82
2. Networking Primer
The 16-bit urgent pointer (UP) field informs the receiver to offset the sequence number
of the first byte of regular data if there is urgent data.
The variable-length OPT field is not mandatory in the TCP header. This field can be used
for functions such as setting buffer sizes for receiving large chunks of data.
The variable-length PAD field is used to round out the header of a TCP datagram to the
nearest 32-bit group (4 bytes) so the DO field is correct.
UDP is very simple compared to TCP. Since UDP is connectionless, there is no need for
connection-controlling information. Acknowledgments, sequence numbers, and the like
are not needed. A UDP header is only 8-bytes long. Figure 2-33 illustrates the fields of a
UDP header.
Multicast
So far, this chapter has discussed unicast and broadcast IP addresses. Unicast IP
addresses send data to one host, whereas broadcast IP addresses send to all hosts in that
Downloader demo watermarks
network. What if you wish to send only to some of the devices on a particular network?
This is what a multicast IP address does. When a group of devices wishes to receive data
at the same time, a sender can send that data once to a multicast IP address to which the
group listens. These IP addresses are in the Class D group of IP addresses, which are in
83
2. Networking Primer
the range of 224.0.0.0 to 239.255.255.255.
Often, a multicast address is applied to a device when a service requiring it is enabled.
Video streaming is a type of service that can use multicast. When a device wishes to
receive the video, it can listen in to the multicast IP address to which that particular video
is being sent.
In Figure 2-34 below, routers A, C, and D have enabled multicast. These three routers
will listen to any IP packet that is sent to the destination IP address of 224.0.1.5 in
addition to their normal unicast IP address in the 192.168.20.0/24 network. Routers
B and E will not pay any attention to packets addressed to this address because they are
not listening in for multicast addressing. They will only listen to their unicast IP address.
Multicast is explained in detail in Chapter 14.
www.ebook-converter.com
Figure 2-34. Multicast IP-Enabled Network
Chapter Summary
In this chapter, we started the discussion with the OSI model and what devices work at
which layers. It was pointed out that networking for the most part concerns Layers 1 to 4
of the OSI model. Acting as the post office, the job is to get data from point A to point B.
The electrical or optical signals on the cable are types of Layer 1 implementations. The
Layer 1 physical signals are used by data link Layer 2 as the connection between like
Downloader demo watermarks
Layer 2 switches. Layer 2 switches form the connection between Layer 3 routers. This
relationship is most important. An effectively built network starts from the ground
(lowest layer) up. Nothing will get anywhere if you don't plug in the cable.
84
2. Networking Primer
After the OSI discussion, we discussed the basics of various types of Layer 2 data link
technology. Ethernet and the various speeds are examples of LAN broadcast protocols.
Frame Relay, PPP, and ATM are examples of WAN nonbroadcast technology. Typically,
data moves from a host on a LAN to WAN to LAN through the use of LAN/WAN
switches separated by routers. These data link protocols are the local transport between
devices for the Layer 3 protocols.
The Layer 3 protocol, we explained, is IP. This is the most widely used Layer 3 protocol
by far. It is the protocol that e-mail, the World Wide Web, Internet video, and Internet
chat protocols use to get from host to host. It uses an addressing scheme that allows
routers to forward IP packets in the appropriate direction until they get to their
destination. IP addresses can be grouped together using a subnet mask to represent a
range of IP addresses. These ranges can be made smaller to fit smaller networking needs
or larger to summarize several networks, all just by moving the bits of the subnet mask
right or left respectively.
Lastly, two types of Layer 4 protocol were explained: TCP and UDP. They are
completely different in nature and are used according to the upper-layer needs. You may
need connectionless, consistent bandwidth in a stream for jitter-free video (UDP) or
connection-oriented bursty bandwidth for file-transfer accuracy (TCP).
www.ebook-converter.com
These layers fit together handsomely. Physical connections transporting Layer 2
protocols carry Layer 3 IP laden with Layer 4 TCP or UDP depending on the needs of
the upper-layer application from one place to another. That is networking.
Bibliography
www.ebook-converter.com
www.ebook-converter.com
Since the architecture and operating-system commands of these routers differs from those of other
vendors, such as Cisco, with which you may already be quite familiar, the material covered here should
help you to understand the rest of the material in this book. It will also undoubtedly help in your pursuit
of Juniper Networks career certifications.
M5 and M10
The M5 and M10 routers were introduced in September 2000 as the latest additions to the router family.
87
3. Juniper Networks Router Architecture
The M5 and M10 were released at the same time because they had similar architectures with two
different throughput capabilities (5Gbps on the M5 and 10Gbps on the M10). Both routers employ the
Internet Processor II ASIC, providing forwarding table lookups at 40Mpps.The M10's chassis looks the
same as the M5's; however, there are two forwarding engine boards (FEBs) in the M10, allowing for a
maximum of eight physical interface cards (PICs) to be used.
M20
The second router introduced by Juniper Networks was the M20, released in December 1999. The M20
also uses the Internet Processor II ASIC and is capable of throughput in excess of 20Gbps.
With physical dimensions of 14 × 19 × 21 in., or 35.56 × 48.26 × 53.34 cm, a network administrator can
stack five chassis in a single equipment rack. The M20 was the first Juniper Networks router available
with redundancy (power supply, routing engine, and system and switch board [SSB]). This greatly
increased the appeal of the Juniper Networks routers to the marketplace. Component failure in an
operational network can be disastrous. By addressing the need for component redundancy, Juniper
Networks was able to allay this fear in the minds of potential customers.
M40
The M40 router was the first product launched by Juniper Networks. With a chassis size of 35 × 19 ×
23.5 in., or 88.9 × 48.26 × 59.69 cm, deployment is limited to two chassis per equipment rack. However,
the router's architecture provides over 40Gbps throughput. The M40 supports the same PICs as the M20.
www.ebook-converter.com
The PICs are compatible between both platforms.
Although initially deployed with the Internet Processor I and without ACL capability, the M40 now runs
on the Internet Processor II and has addressed the need for filtering. This platform, however, does not
provide for the same component redundancy as the M20 and M160 models, an important distinction for
most customers.
M40e
To answer the need for the throughput of the M40 coupled with redundant-component capability, Juniper
Networks introduced the M40e platform in February 2002. The M40e router has the same footprint and
port density as the M40, but it provides the optional redundancy that the M40 does not. This model is
compatible with most of the PICs from the M20, M40, and M160 models.
M160
Downloader demo watermarks
The M160 was introduced in March 2000 as the third box in the M-Series. It is a formidable router, both
in size and capacity. The M160 chassis is 35 × 19 × 29 in., or 88.9 × 48.26 × 73.66 cm. This allows for
two per equipment rack.
88
3. Juniper Networks Router Architecture
The M160, to date, is the highest-rated core router on the market. Independent testing has shown that the
M160 outperforms the competition in areas of BGP table capacity, MPLS LSP capacity, route flapping
recovery at OC-192 speeds, convergence at both OC-192 and OC-48 speeds, and filtering at both OC-
192 and OC-48 speeds. In additional tests, the M160 has matched or exceeded the competition in the
areas of CoS at OC-48 and OC-192 speeds and IP and MPLS baseline testing at OC-48 and OC-192
speeds.
The M160 platform provides the maximum throughput and port density necessary for the next generation
of Internet architectures.
G10
In November 2001, Juniper Networks announced its intent to acquire Pacific Broadband
Communications and its CMTS. Subsequently, Juniper Networks rereleased that CMTS as its G10 router.
This product is aimed at the growing broadband-remote-access-service (BRAS) market that delivers
Internet service into private homes and small businesses primarily through cable modems.
A chief complaint of cable Internet subscribers is that as more subscribers join in a given area, the
amount of bandwidth available to each end user can drop dramatically. The G10 uses a custom-built
ASIC that has the capability of 20 legacy CMTS chips. The end result is that this device is capable of
supporting greater numbers of subscribers using less bandwidth.
Architecture Overview
www.ebook-converter.com
When Internet routers were first introduced, the amount of traffic processed was much less than it is
now. The router's brain, its CPU, was robust enough to handle its own tasks, the tasks of creating and
managing the routing tables, and the task of forwarding the packets. Some routers on the market today
still use this processor-based technology.
Juniper Networks has created a device that segregates the tasks and assigns them to different parts of the
router, sort of like an assembly line. You can see this process in Figure 3-1. Because Juniper Networks
routers are designed to serve the busy core of the network, the number of packets processed per second
is in the millions. If the router were required to manage everything from its CPU, throughput would
suffer, as would the ability to provide service guarantees.
www.ebook-converter.com
router as quickly as possible. After all, the main duty of an Internet router is to handle the packets as little
as possible as they move through its realm. To achieve flawless, wirespeed performance, Juniper
Networks ensured that certain processes would be physically and logically segregated on their routers.
Figure 3-2 shows the segregation of processes between the two main components of a Juniper Networks
router. The rest of this chapter explains these components and processes further.
Routing Engine
The Juniper Networks routing engine is an integral part of the router architecture and provides for all of
the central processing and route processing requirements. As you will learn in this section, the routing
engine also provides storage for the operating system and provides the CLI through which the operating
www.ebook-converter.com
system is configured.
Although there are differences between the various Juniper Networks router models, which are outlined
in the Section 3.2.1.3, the design of the routing engine is similar in all of them. The routing engine is
primarily responsible for running the routing protocols, keeping the routing tables up-to-date, sending
routing updates to the PFE, and performing system management. The routing engine communicates
directly with the PFE through a 100Mbps connection.
www.ebook-converter.com
feature, provided by JUNOS, also allows the system administrator to return to a previous configuration
quickly, should the new configuration prove problematic.
Finally, Juniper Networks routers use modular software that cleanly separates processes from each other.
The problems of one process will not impact other processes that may be running. Additionally, the
software is designed to scale well to the needs of tomorrow's Internet routing demands.
JUNOS
JUNOS is the operating system currently used on all Juniper Networks routers. JUNOS is not just an
operating system providing a CLI for configuration, but also a feature-rich platform providing
troubleshooting tools and advanced feature sets. The operating system also incorporates an application
programming interface (API) system for external program calls and scripting capabilities. JUNOS, in
conjunction with the Internet Processor II, comprises the industry's most advanced BSD-based router
operating system in today's marketplace. The routing engine is based on an Intel PCI platform running
JUNOS. JUNOS runs in flash memory with an alternate copy stored on the router's hard disk. As you can
Downloader demo watermarks
see in Figure 3-3, the operating-system kernel is layered on the PCI platform and establishes
communication between the PCI platform and the system processes. The kernel is also responsible for
making sure that the forwarding tables in use by the PFE are in sync with those in the routing engine.
92
3. Juniper Networks Router Architecture
www.ebook-converter.com
management function stops, this process will attempt to restart it.
5. The routing kernel process controls everything else. In addition to providing the underlying
infrastructure to all JUNOS software processes, the routing kernel process provides the link between
the routing engine and the PFE.
One or more routing tables are maintained by the operating system. Routing policy is maintained on
JUNOS within the routing engine.
Let's take a closer look at the processes running on the routing engine. Figure 3-4 gives a visual
representation of how these processes all work together to carry out the business at hand. You'll notice
that nearly all of the processes communicate directly with the kernel. The exceptions are the user
process, which must access the kernel through the CLI, and the routing table, which is simply a product
of the routing protocol processes. Any communication between the routing engine and PFE originates
from the kernel itself.
www.ebook-converter.com
Table 3-1. Routing Engines on Different Models
Available Compact
Model Platform Redundancy Flash SDRAM
M5 and M10 333MHz Pentium II with integrated NO 96MB 256, 512, or
256MB level 2 cache 768MB
M20, M40, and 333MHz Pentium II with 512MB cache M20—YES 80MB Up to 768MB
M40e
M40—NO
M160 333MHz Pentium II with integrated YES 80 or 768MB
256MB level 2 cache 96MB
94
3. Juniper Networks Router Architecture
Acts as a middle man between the routing engine and the sensors throughout the system; relays
statistical information to the routing engine, and relays control messages and alarms out to the system
from the routing engine
Controls power-up and power-down of system components
Decides which of any given redundant components will act as master
Performs reset attempts on flexible PIC concentrators (FPCs), when necessary (the FPC will be
discussed later in this chapter in Section 3.2.2)
Acts as the SONET 19.44MHz clock source and monitors all other system clocks
You have probably noticed that some of these functions are performed by the routing engine itself on
other router modules. While this is true, no other M-Series model provides the port density and
forwarding speed of the M160. Some of the functions traditionally built into the routing engine have been
moved out into this new router component, the MCS, to focus the routing engine on more specific tasks.
The MCS comprises the following:
A PCI interface to the routing engine
Two BITS interfaces for external clock sources
A 100Mbps Ethernet interface to other system modules
www.ebook-converter.com
A 19.44MHz stratum 3 SONET clock source
A controller for monitoring the sensors
A debugging port (RS-232)
LEDs
An offline button
95
3. Juniper Networks Router Architecture
Alarm indicators
Routing engine ports
LCD display screen (on the M40 and M160 only)
The craft interface on an M40 model, shown in Figure 3-5, displays the status of the FPCs, of the routing
engine and of general alarm conditions. Each FPC has a corresponding button on the craft interface.
LEDs above the button indicate whether the FPC's status is “OK” or it has failed to initialize.
www.ebook-converter.com
Alarm LEDs indicate the level of an alarm if one has occurred. On this alarm panel are two alarm relay
contacts. These can be used to connect external alarm devices to the craft interface. If a yellow or red
alarm occurs, the external alarm device would also be activated. Alarms can be silenced with the alarm
cutoff button, but this does not remove the alarm condition.
Red alarms indicate a condition in which a service interruption could occur, such as a component failure.
Yellow alarms are generally indicative of recoverable errors or maintenance alerts.
Routing engine access is provided on the right side of the craft interface through a console port, an
auxiliary port, and a management Ethernet port. The status of the routing engine is indicated as either OK
or Fail. More information about the LED status indicators is provided in Table 3-2.
Table 3-2. Craft Interface Indicators
LEDColor/Action Description
OK Green/BlinkingInitializing
Downloader demo watermarks
OK Green/Solid Running
Fail Red/Solid Offline, owing to failure (In the case of the routing engine, this could mean that the
system control board did not detect the routing engine.)
ALARMS
Red Alarm Red/Solid System failure, power supply failure, or system threshold exceeded
96
3. Juniper Networks Router Architecture
ALARMS
Yellow AlarmAmber/SolidMaintenance alert or indication of temperature increase
The FPC buttons are used to take an FPC offline, before removing the FPC, for instance. To do this,
press and hold the button for three seconds, or until the red Fail LED becomes solid. Then, it is safe to
remove the FPC.
The LCD display screen, shown in Figure 3-6, works in either idle mode or in alarm mode. When in idle
mode, the LCD display will show the current system status. When in alarm mode, the LCD display will
provide more information about the alarm condition. To interact with the LCD menu, use the buttons and
directional arrows to the right of the LCD display screen.
www.ebook-converter.com
1.
2.
Console port
Auxiliary port
3. Management Ethernet port
Using an RS-232 serial cable, an external console, such as a dumb terminal and keyboard, can be
connected to the console port to display system messages and information constantly or to enter the CLI.
A laptop computer or modem may be connected to the auxiliary port for quick, portable access to the
CLI.
The management Ethernet port can be used to connect the router to any Ethernet LAN through an
autosensing 10/100 RJ-45 port. Most network administrators connect this port to a management LAN for
out-of-band management of the routers. Unlike with routers from some other vendors, this management
port can be controlled via the CLI, but it will not route traffic and, therefore, cannot be used as a spare
port.
Downloader demo watermarks
Redundancy and Maintenance Options
In the busy network core, network availability is everything. Juniper Networks has designed its routers to
reduce single points of failure. Routing engines are no exception. Most router models can be configured
97
3. Juniper Networks Router Architecture
with redundant routing engines, thereby reducing system downtime in the event of a failure. (There will
be an interruption of routing services during the failover, however, as there is whenever an routing engine
is inserted or removed.) Table 3-3 provides more information on redundant components in each router
model. (Note that some of the components described here will be covered in detail later in this chapter.)
Table 3-3. Redundancy in Components by Model
Model M5 and M10M20 M40 and M40e M160
Redundant routing engine functionsnone P/S P/S P/S
Cooling Cooling Cooling
Routing engine Host module
SSB PFE clock generator
SFM
The routing engine is said to be hot-pluggable, which simply means that it may be inserted while the
router is powered up. Routing functions will be interrupted whenever a routing engine is removed or
inserted, however.
Note
If the router does not have two routing engines, the router will not be operational without the
www.ebook-converter.com
single routing engine inserted.
Maintaining the routing engine requires attention to the LED on the craft interface to check for alarms or
other indications of operational problems. The system administrator can also find some information from
the CLI by using the following command:
system@m20# show chassis routing-engine
98
3. Juniper Networks Router Architecture
Notice that you can see items such as router uptime (the amount of time the router has been powered up),
temperature of the chassis, and the amount of DRAM installed.
Many parts of the routing engine are field-serviceable (also called field-replaceable), meaning that
replacement or spare parts can be used to get the routing engine back into operation quickly without
having to ship it to Juniper Networks for repair. Replacement of these parts should be done under the
guidance of an engineer from the JTAC and is not recommended for inexperienced service personnel.
www.ebook-converter.com
the business of forwarding. To that end, the PFE itself is split into several major components:
Midplane
PICs
FPCs
Control board (switching/forwarding)
The midplane, sometimes referred to as the backplane, is really the back of the cage that holds the line
cards. The line cards connect into the midplane when inserted into the chassis from the front. The routing
engine plugs into the rear of the midplane from the rear of the chassis. The purpose of the midplane is to
carry the electrical signals and power to each line card and to the routing engine.
The PICs are the actual components that contain the interface ports. Each PIC is plugged into a FPC,
99
3. Juniper Networks Router Architecture
www.ebook-converter.com
connect to an FPC. There are obviously other significant architectural differences. The PICs for the M5
and M10 are interchangeable; however, due to architectural differences these same PICs cannot be used
in the M20, M40, and M160.
The FPC performs the important functions of decapsulating the packet, parsing it, and breaking it up into
64-byte memory blocks, before passing it to the distributed buffer manager (DBM) ASIC. It is at this
point that the packet is first written to memory. The DBM ASIC manages and writes packets to the
shared memory across all FPCs. While writing the packets to buffer memory, the DBM ASIC is also
extracting information on the destination of the packet, as you will see this when we look at packet flow
later in this section.
Note
In each router slot, there must either be an FPC or a blank panel installed to ensure adequate
cooling and airflow through the router.
PFE Processes
As Figure 3-8 shows, the PFE has an embedded microkernel that serves as the brains of the PFE,
interacting with the interface process and the chassis process to monitor and control these functions. It is
the interface process that has direct communication with the kernel of the routing engine. This
communication includes forwarding exception and control packets to the routing engine, receiving
packets to be forwarded, receiving the forwarding table updates, providing information about the health
of the PFE, and permitting configuration of the interfaces from the user-CLI process on the routing
engine.
ASICs
Now we will take a look at the location of the ASICs involved in packet processing and see how they
relate to one another. Figure 3-9 shows a section-by-section view of the positioning and communication.
www.ebook-converter.com
Managing link-layer framing and creating the bit stream
Performing cyclical redundancy checks (CRCs)
Detecting link-layer errors and generating alarms, when necessary
On the FPC is another I/O manager ASIC. This ASIC takes the packets from the PICs and breaks them
into 64-byte memory blocks, also known as J-cells, for storage in shared FPC memory. It is at this point
that accounting is performed and CoS policies, which define the handling of traffic based upon
classification of types of service, are implemented. This ASIC is specifically responsible for the following:
Breaking incoming packets (as bit streams) into 64-byte blocks, or J-cells
Sending the J-cells to the first DBM
Decoding encapsulation and protocol-specific information
www.ebook-converter.com
The I/O manager ASIC on the egress FPC can perform some value-added services. In addition to
incrementing TTL values and re-encapsulating the packet for handling by the PIC, it can also apply CoS
rules. To do this, it may queue a pointer to the packet (never the packet itself) in one of four available
queues, each having a share of link bandwidth, before applying the rules to the packet. Queuing can be
based on destination address, the random early detection (RED) or weighted RED (WRED) algorithm,
the value of precedence bits, and so on. Thus, we can say that the I/O manager ASIC on the FPC is
responsible for the following:
Receiving the J-cells from the second DBM ASIC
Incrementing TTL values, as needed
Queuing a pointer to the packet, if necessary, before applying CoS rules
Re-encapsulating the J-cells
Packet Flow
Now that you have a little background information on the various ASICs, it is helpful to see exactly how
103
3. Juniper Networks Router Architecture
a packet moves through the router. Knowing how the packets move through the router can help clarify
what you have learned about the architecture of the router. First, take a look at Figure 3-10, and then
read the explanations below to see how the forwarding decisions are made.
www.ebook-converter.com
www.ebook-converter.com
three times. If unsuccessful, the control process takes the FPC offline and sends a notification to the
routing engine.
Transfer of control and exception packets—The control board handles nearly all exception packets—
those packets for which there is no known path to the destination—passed to it from the Internet
processor ASIC. The board may then pass exception packets to the routing engine. It may also
communicate errors to the routing engine via syslog messages.
Route lookups—A copy of the forwarding table is stored in SSRAM. When packets are received to
be processed, the Internet processor ASIC performs the lookup on this table, makes a forwarding
decision, sends a message to the midplane about the decision, and forwards the packets to the egress
interface.
System monitoring—The control board keeps tabs on the condition of the router based on
information it receives from sensors. If an abnormal condition is detected, the board immediately
notifies the routing engine.
Downloader demo watermarks
On most of the M-Series routers, the control board is hot-pluggable, meaning that the router need not be
powered down to install or uninstall the control boards. A brief service interruption will occur, usually
about 500 ms. On the M5 and M10 routers, however, the FEB is not hot-pluggable. The system must be
powered down for maintenance and replacement of this board.
105
3. Juniper Networks Router Architecture
M5 and M10 FEB
The M5 and M10 routers are the newest of the M-Series line. Despite their small footprint, these
powerful routers also use control boards in the PFE. The FEB installs in the rear of the M5 or M10
chassis, just above the power supply. The FEB on the M5 and M10 is neither hot-removable nor hot-
insertable! You must power down the chassis before removing or inserting these boards.
The FEB contains the following:
A processor
The Internet Processor II ASIC
Two DBM ASICs
I/O ASIC with 1MB SRAM—one on the M5, two on the M10
33MHz PCI bus connecting the system ASICs
The FEB also has its own storage—four slots of 2MB RAM to store forwarding tables associated with the
ASICs, 64MB DRAM for the microkernel, EEPROM for the storage of the serial number and version of
the FEB, and 512MB flash EPROM, which is programmable.
M20 SSB
www.ebook-converter.com
On the Juniper Networks M20 router, the SSB installs from the front of the chassis into the upper-most
slot. The SSB contains the Internet Processor II ASIC and two DBM ASICs. The SSB has its own
processor and its own storage—four slots of 2MB RAM to store forwarding tables associated with the
ASICs, 64MB DRAM for the microkernel, EEPROM for the storage of the serial number and version of
the SSB, and 512MB flash EPROM, which is programmable.
www.ebook-converter.com
Management and Traffic Interfaces
This section will introduce you to the two types of interfaces available on the routers: management and
traffic. A management interface is a physical or virtual port through which the router can be configured,
maintained, or monitored, but which does not route traffic. A traffic interface is one through which
routable network conversations are forwarded.
Several methods are provided that permit for the management and administration of the routers. These
interfaces to the router include the following:
SNMP—Network engineering staff or administrators can not only learn about the health and activity
of the router through SNMP, but can also configure it from a network management workstation using
any popular SNMP tool. The benefit of this is that it makes configuration management simple. Past
configurations can be archived (and dated) on the management station. It also means that many
remote routers can be managed and configured from a central workstation.
www.ebook-converter.com
per port
Channelized STM-1 to E1 Yes Yes Yes
1-port STM-1 SMIR with 63 E1 channels
per port
DS-3 Uses both Uses the 4 port only Uses the 4 port only
2-port
4-port
E1 Yes Yes Yes
4-port
E3 Uses both Uses the 4-port onlyUses the 4-port only
Fast Ethernet Uses the 4-port onlyUses the 4-port onlyUses both
108
Fast Ethernet 3. Juniper
Uses the 4-port onlyUses Networks
the 4-port Router
onlyUses bothArchitecture
PIC Type M5 and M10 M20 and M40 M160
4-port
48-port
Gigabit Ethernet Uses the1-port only Uses the1-port only Uses all
1-port LH, LX, SX
2-port LX and SX
4-port SX
SONET/SDH
2-port OC-3c/STM-1 MM and SMIR YesNo No
4-port OC-3x/STM-1 MM and SMIR YesNo No
1-port OC-12c/STM-1 MM and SMIR both in concatenated and nonconcatenated modesYesNo No
4-port OC-3c/STM-1 MM and SMIR No YesYes
1-port OC-12c/STM-4 MM and SMIR both in concatenated and nonconcatenated modesNo YesYes
4-port OC-12c/STM-4 MM and SMIR No No Yes
1-port OC-48c/STM-16 SMSR concatenated and nonconcatenated modes No YesYes
1-port OC-48c/STM-16 SMLR concatenated and nonconcatenated modes No YesNo
1-port OC-192x/STM-64 SR2 and LR both in concatenated and nonconcatenated modes No No Yes
T1 YesYesYes
4-port
Tunnel Services PIC YesYesYes
www.ebook-converter.com
The difference between the models lies primarily in the number of ports supported and in the type of
throughput that is available on the backplane. Table 3-5 lists the type of throughput, the number of PICs
supported, and the number of ports for each model.
Table 3-5. Port Density by Model
Model M5 M10 M20 M40 M160
Full-Duplex Throughput 6.4Gbps 10Gbps 20Gbps 40Gbps 160Gbps
Medium to Medium to Medium to
Target Network Size Large Large Large Large Very Large
Number of PICs 4 8 16 32 32
Supported
Number of Ports Up to 16 Up to 32 Up to 64 Up to Up to 32 OC-12
128
or
Downloader demo watermarks Up to 32 OC-48
or
109
3. Juniper Networks Router Architecture
Model M5 M10 M20 M40 Up to 8 OC-192
M160
It is important to note that, by default, all physical interfaces on the Juniper Networks routers use PPP,
but can be configured to use other Layer 2 encapsulation types. If an interface is of a type that does not
support PPP, you must configure the appropriate encapsulation type. For specific information about
interface encapsulation options, including configuration examples, please refer to Chapter 8.
Cooling Systems
With the exception of the M5 and M10 routers, each Juniper Networks router incorporates redundancy in
the cooling system. This section provides a general familiarity with the airflow through each model of the
M-Series routers.
Caution
Never operate the router for more than one minute without the fan assembly installed! The
function of the fans is to keep all components cooled to an optimal operating level. Running the
unit without fans in place could void your warranty and limit any maintenance available to you.
Check with your Juniper Networks representative for more information.
M5 and M10
The single fan assembly on either an M5 or M10 is on the left side of the router if you are facing the front
of the chassis. The fan assembly contains four fans that pull air from the left to the right across the PICs.
Juniper Networks suggests leaving six inches on either side of any installed M-Series router, as shown in
www.ebook-converter.com
Figure 3-11, to ensure adequate airflow.
M20
The M20 router has four fan assemblies—three on the front of the chassis and one in the rear. The three
fans on the front left side of the chassis provide side-to-side cooling for the FPCs and for the SSB. The
rear fan assembly is located to the right of the routing engine and provides cooling directly to the routing
Downloader demo watermarks
engine. All four fan assemblies plug directly into the router midplane. In addition, the power supplies on
the M20 router have integrated fans, providing built-in power-supply cooling. The airflow model is shown
in Figure 3-12.
110
3. Juniper Networks Router Architecture
M40
The cooling system for the M40 router is a little more complex, consisting of three separate subsystems:
the impellers, the integrated power-supply fans, and the triple fan assemblies.
The router contains two sets of redundant impellers, located at the top of the chassis and at the bottom of
www.ebook-converter.com
the card cage. These impellers pull air in through the front of the card cage and across the PFE, forcing
the exhaust out the back of the chassis, thus cooling the PFE. You can see this process in Figure 3-13.
The impellers are designed to run at less than full capacity unless a condition is detected, such as a rise in
temperature, which would increase the cooling needs. At that point, the impellers can adjust the fan
speed to meet the new requirements. An air filter protects the impeller from drawing in foreign objects
that could damage the fans. It is a good idea to keep the air filter in place when the router is operational.
www.ebook-converter.com
A set of three load-sharing fan trays, located at the upper rear of the chassis, pull in air through a filter
and intake at the front of the chassis to keep the routing engine cool. Because the fan trays are load-
sharing, if one fan tray is removed, the others remaining will adjust to meet the current cooling
requirement.
Finally, the power supplies on the M40 router have integrated cooling fans, just like those on the M20.
M160
The M160 router also uses impellers and fan trays to keep the system cool. A front cooling system uses
an upper impeller that works with the fan tray (installed in front) to pull air through the front of the
chassis, up through the card cage, and then sends the exhaust out the rear of the chassis.
The rear cooling system uses two impellers in the upper and lower part of the chassis to pull air in over
the routing engine, SFM, MCS, and PCGs. As you can see in Figure 3-14, the air is drawn in through the
Downloader demo watermarks
front of the chassis, through the air intake cover, and the exhaust is sent out the rear of the chassis. The
power supplies are cooled by the front and rear cooling systems and do not have integrated fans.
112
3. Juniper Networks Router Architecture
Note
Downloader demo watermarks
It is a good idea to keep the original PC card (as well as any copies of future releases) in a safe
place in case the file system becomes corrupted or unstable. This will allow you to revert to the
original version by rebooting the router with the PC card in place.
113
3. Juniper Networks Router Architecture
To power-up the router, perform the following steps:
1. Power-up the management device that is connected to the console, auxiliary, or management
Ethernet port on the routing engine.
2. Turn the power on for each power supply.
3. Check the power supply OK LEDs and the output to the management device to ensure that the
router booted properly.
Note
If nothing is plugged into the management Ethernet interface, a RED alarm will be generated.
Plug in any device cable with an RJ-45 connector to prevent this alarm.
Other visible activity to check at startup includes the following:
Craft interface displays, such as Starting routing engine, Starting PFE, and Starting Card
FPC LEDs, which blink green until testing is complete (if all tests pass, the lights should be solid
green)
Alarm LEDs, as appropriate
PIC LEDs, which remain off unless the interfaces have been configured
www.ebook-converter.com
Configuring the Router
During the initial configuration of the router, you will need to configure the following:
A password for user ROOT. This can be set in three different ways:
1. Plain text (not logged, if logging is enabled):
root@router# set system root-authentication plain-text-password
password (password is prompted on a separate line)
2. Pre-encrypted:
root@router# set system root-authentication
encrypted-password password
114
3. Juniper Networks Router Architecture
A hostname for the router: [edit] root@router# set system host-name name
The domain name:
[edit]
root@router# set system domain-name domain
www.ebook-converter.com
root@router# set system login user username class class
authentication plain-text-password
Note
It is vitally important to configure a NON-ROOT user, as ROOT cannot Telnet into the router!
After configuring the preceding, save your changes:
[edit]
root@router# commit
115
3. Juniper Networks Router Architecture
Filename Contents
jbase Additions to JUNOS
jkernel The operating system package
jroute The routing engine software
jpfe The PFE software
jdocs Updated online reference documentation
jcrypto Security software (U.S. domestic only)
jbundle All of the files combined
To see the software that is currently installed on the router, use the following command:
root@router> show system software
www.ebook-converter.com
Information for jkernel:
Comment:
JUNOS Kernel Software Suite [5.0R3.3]
116
3. Juniper Networks Router Architecture
2. Perform a system backup on the router you wish to upgrade.
3. Copy the software package(s) to the router you wish to upgrade.
4. Add the new software package(s) to the router you wish to upgrade (this will effectively delete the
old packages).
5. Reboot the router.
117
3. Juniper Networks Router Architecture
This will copy the file from an FTP server to the /var/tmp directory on the router's hard disk. This is
simply an example of one way to copy the file. The M40 also has an LS-120 floppy drive that can be
used for the storage and transfer of files. When installing a new software version, you should do so from
an out-of-band management source, such as the console. An in-band source, such as Telnet, could be lost
while you are upgrading.
Note
118
3. Juniper Networks Router Architecture
JUNOScript
As of JUNOSv4.3B2, the JUNOScript feature is available. This feature provides an alternate method for
communicating information to and from the router. This method is an extensible-markup-language
(XML) interface for communicating with the router. Because the JUNOScript API is an XML interface,
it enables you to build client applications for monitoring and communicating information to and from the
router using Perl. JUNOScript can also support HTML through the use of CGI scripts.
JUNOScript needs to be configured on a UNIX machine. The process to enable a client application can
be found on the Juniper Networks Web site at www.juniper.net/support/junoscript. This link lists the
required software components needed for the installation, as well as links to instructions and sample Perl
scripts for use with JUNOScript.
Chapter Summary
This chapter covered information about the M-Series routers, their architecture, port density, and design,
including the latest models introduced by Juniper Networks—the M40e and the G10. By focusing on the
structure, process flow, and components of each router model, the material has given you a solid basis by
which to understand and apply the information that you will be given in the rest of this book.
After reading this chapter, you should have a good idea of how routing takes place through a Juniper
Networks router, the function of the ASICs, and how fan trays and impellers keep the system
components cool. You have also been familiarized with the router startup process and in what order the
boot image locations are searched.
www.ebook-converter.com
In addition to information on architecture and processes, you were also given information on upgrading
the system software and some simple system administration. These topics will be covered in detail later in
the book.
Bibliography
www.ebook-converter.com
Operational Mode
The operational mode is used to monitor the current status and the real-time operation of the router. This section will introduce you to the use
of this CLI mode. In contrast to the configuration mode, which will be discussed later in this chapter, the operational mode is used to issue
commands that you want to make active immediately. The configuration mode, on the other hand, is used to edit files that can be saved and
enacted either now or later.
www.ebook-converter.com
NOTE:The prompt name will vary and will reflect the name of the current
user. In our display the name of the user that has logged in is lab.
Exit the operational mode by using the quit command:
lab@Chicago> quit
Chicago (ttyd0)
login:
Operational-Mode Commands
If you type a question mark at the operational-mode prompt, the router will display all of the available commands as a list. This list displays
functions that can be performed in this mode. As you see in the example below, the operational mode primarily provides commands for
troubleshooting the software, network connectivity, and monitoring and debugging the router. However, in this chapter we will only cover the
commands pertinent to the CLI environment.
lab@Chicago> ?
Possible completions:
clear Clear information in the system
configure Manipulate software configuration information
file Perform file operations
help Provide help information
121
4. The Command Line Interface
ssh Open a secure shell to another host
start Start a software process
telnet Telnet to another host
test Diagnostic debugging commands
traceroute Trace the route to a remote host
www.ebook-converter.com
'p' is ambiguous.
^
Possible completions:
pfe Show packet forwarding engine data
pim Show information about PIM
policy Show policy information
lab@Chicago> show po<space>
lab@Chicago> show policy
Note
Using the space bar is similar to pressing the tab key, however the tab key will also complete user-configured parameters in the
configuration mode, whereas the space bar will not.
www.ebook-converter.com
length. The default screen length is 24. Setting the screen length to 0 will allow the displayed output to scroll without pause. This is useful for
capturing output into a file or for using scripting languages when interacting with the router. Setting the screen width will adjust the number of
columns that are displayed on the screen. The default value for screen width is 80.
The syntax for setting the screen length and screen width are as follows:
set CLI screen-length <length> Number of lines on screen (0..100000)
set CLI screen-width <width> Number of characters on a line (0..100000)
The following examples show how to set these commands:
lab@Chicago> set CLI screen-length 2
Screen length set to 2
lab@m5upper> set CLI screen-width 5
Screen width set to 5
123
4. The Command Line Interface
lab@Chicago> set CLI terminal ?
Possible completions:
ansi ANSI-compatible terminal
small-xterm Small (24 line) xterm window
vt100 VT100-compatible terminal
xterm Large (65 line) xterm window
Note
Terminal settings that are set in operational mode are only valid for the length of the session. The default terminal type is unknown.
set date
Setting the date and time can be done by using operational-mode commands. The syntax for this is as follows:
set date <time> New date and time (YYYYMMDDhhmm.ss)
The following example shows a sample setting:
lab@Chicago> set date 200202171448.00
Sun Feb 17 14:48:00 UTC 2002
Note
It may be necessary to use the set date command even when using the Network Time Protocol (NTP), as NTP will fail if the time
difference between router and NTP server is large. This will be noted in the logs.
Note
When setting the date and time, do not use any slashes or dashes.
www.ebook-converter.com
While in operational mode, you may want to display a list of available commands. You might also want to list the possible parameters for a
single command. Maybe you want to repeat a part of the same command you just used, delete a character, or possibly even a word. Functions
like these can be performed on the command line by using CLI-provided features, such as the question mark, tab key, and some UNIX-style
keyboard sequences. These keyboard sequences can assist you in maneuvering through the CLI. Table 4-1 lists some of the different keyboard
sequences and their function.
Table 4-1. CLI Navigational Keyboard Sequences
Function Keyboard Sequence
Move cursor back one character Ctrl-b
Move cursor forward one character Ctrl-f
Move cursor to beginning of line Ctrl-a
Move cursor to end of line Ctrl-e
Delete character before the cursor Ctrl-h, Delete, Backspace
Delete character the cursor is on Ctrl-d
Delete word before cursor Ctrl-w, Esc-Backspace, Alt-Backspace
Insert most recently deleted text at the cursor Ctrl-y
Redraw the current line Ctrl-l
Scroll backward through history Ctrl-p
Scroll forward through history Ctrl-n
Specify the number of times to execute a key-board sequence (number from one to nine)Esc-number sequence, Alt-number sequence
124
4. The Command Line Interface
Interpreting CLI Messages
From time to time while navigating the CLI, there will be messages displayed on the screen. These messages occur when entering and exiting
configurations, as well as when committing a configuration change. Messages will also be displayed if you have entered invalid or incorrect
input to the CLI. In this section, we will show an example of CLI messages that could be displayed in the operational mode. Configuration-mode
messages will be covered in the next section.
In the following example, the user enters the ambiguous value con. Notice that the caret symbol (^) is displayed at the location in question. This
helps us to identify where we went wrong. The user then tries to set a CLI command and does not enter enough information. This is noted again
by the caret symbol, which is pointing this time to the space after the parameter CLI, and the message displayed lets us know that a command
was expected. In this event, the user may need to include a parameter, such as terminal or complete-on-space, for the expected
command value. This particular example lets us know that while what we have entered is not incorrect, it is not enough information.
lab@Chicago> show con
^
'con' is ambiguous.
lab@Chicago> set CLI
^
syntax error, expecting <command>
Displaying Output
When output is displayed on the screen, it will be listed one page at a time. The size of the page is determined by the set CLI screen-
length command. This means that when the amount of information that needs to be displayed is greater than the screen length, the CLI will
separate each page of information with a -(more)- prompt. Once the -(more)- prompt is displayed, you can search the output. The
following example shows one page of the displayed output and the -(more)- prompt:
www.ebook-converter.com
lab@Chicago> show configuration
version 5.0R3.3;
system {
host-name Chicago;
login {
user test {
uid 2001;
class superuser;
authentication {
encrypted-password “$Upc0”; # SECRET-D
ATA
}
}
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “0”; # SECRET-D
ATA
---(more)---
Note
The configuration-mode pipe options will include a compare parameter and some additional display commands. We will cover these
in the configuration-mode section.
Filtering Output
From time to time, you might find it helpful to filter the displayed output. Prior to executing a command that would display output to the CLI
screen, you have options to filter the displayed output. These options can be used to count the number of lines in a file, match specific items,
find a certain parameter, and so on. In the following examples, we will discuss these different options and show an example of each.
count
The count parameter is used for counting the number of lines in a file or table. The syntax is as follows:
show route protocol isis | count
The following examples show how to use the count parameter. In the first statement, the user counts the number of lines in the configuration
file. In the second, the user counts the number of lines in the isis section only of the same configuration file:
lab@Chicago> show configuration | count
Count: 143 lines
www.ebook-converter.com
lab@Chicago> show route protocol isis | count
Count: 59 lines
display
The display command is used to display the output in XML format. The syntax is as follows:
show configuration | display xml
The next example shows the output of the display command from the first instance of interfaces to the end of the file in XML format:
lab@Chicago> show configuration | display xml | find interfaces
<interfaces>
<interface>
<name junos:key=”key”>fxp0</name>
<speed>100m</speed>
<link-mode>full-duplex</link-mode>
<unit>
<name junos:key=”key”>0</name>
<encapsulation>802.3-llc</encapsulation>
<family>
except
The except parameter allows you to display all output except what you specify after the except option. They syntax is as follows:
show configuration | except <pattern> pattern to avoid
The example below shows the configuration file, first without the except option and then with it. Notice that the uid parameter is visible in
the output. When we use the except option, we are going show everything in the configuration file except for uid.
lab@Chicago> show configuration
version 5.0R3.3;
system {
host-name m5lower;
login {
user test {
uid 2001;
class superuser;
authentication {
encrypted-password “$1$A”; # SECRET-DATA
}
}
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “niG0”; # SECRET-DATA
lab@Chicago> show configuration | except uid
version 5.0R3.3;
system {
www.ebook-converter.com
host-name m5lower;
login {
user test {
class superuser;
authentication {
encrypted-password “$1$A”; # SECRET-DATA
}
}
user lab {
class superuser;
authentication {
encrypted-password “niG0”; # SECRET-DATA
127
4. The Command Line Interface
lab@Chicago> show route | match 192.168.161.0
192.168.161.0/24 *[Direct/0] 3d 02:06:08
Note
If you are using find or match on an entire Internet routing table, for example, there may be a noticeable delay as the Juniper
Networks router does the search. This is normal and should not alarm the user.
hold
The hold option is useful for scrolling up and down through files. Normally, when a command is displayed on the screen, it is displayed one
page at a time; when the output reaches the end of the file, you are sent back to the prompt. This hold option will cause the output to stop at
the end of the file before sending you back to the prompt. This gives you the ability to scroll up and down through the output.
The first output, in the example below, shows the configuration file. The user typing the show configuration command at the Chicago
prompt indicates this. When the output is displayed, the -(more)- prompt appears to indicate the end of that screen and to prompt the user to
press a key to see more. The user then presses the space bar, and the rest of the file is displayed, after which the user is returned to the prompt.
The second output shows the same command used again, but this time it includes the hold option. When the output is displayed in this
example, the first page is the same. However, when the last page is displayed, the user is not sent back to the prompt. Instead, the user sees
100%. This is an indication to the user that he has reached the end of the file, but not been sent back to the prompt. That being the case, the user
can now use the up and down arrows to scroll through the file. Pressing the enter key or space bar when 100% is displayed will return the user
to the prompt. Using Ctrl-c or pressing the q key at anytime will also cause an exit.
lab@Chicago> show configuration
version 5.0R2.4;
system {
host-name Chicago;
login {
class superuser {
permissions all;
}
user lab {
uid 2000;
www.ebook-converter.com
class superuser;
authentication {
encrypted-password “lGdV/”; # SECRET-DATA
}
}
}
services {
ftp;
ssh;
telnet;
}
}
interfaces {
---(more)---
fxp0 {
speed 100m;
link-mode full-duplex;
unit 0 {
encapsulation 802.3-llc;
family inet {
address 192.168.161.16/24;
}
}
Downloader demo watermarks
}
}
128
4. The Command Line Interface
host-name Chicago;
login {
class superuser {
permissions all;
}
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “lGdV/”; # SECRET-DATA
}
}
}
services {
ftp;
ssh;
telnet;
}
}
interfaces {
---(more)---
fxp0 {
speed 100m;
link-mode full-duplex;
unit 0 {
encapsulation 802.3-llc;
family inet {
address 192.168.161.16/24;
}
}
}
}
---(more 100%)---
www.ebook-converter.com
save
There may be times when you find it necessary to save captured output to a file. If that is the case, you might want to use the save option. With
the save option, instead of the output being displayed on the screen, the output will be saved to a file. This functionality is similar to redirecting
output to a file in UNIX. The save option will allow the filename specified to be created and saved to a specified location. By default, if path is
not specified, the file will be stored in the user's home directory. It is also possible to send the file to a remote location via FTP.
If you want to see the files that you have saved locally, you can use the file list command to list them. If you type the file list
command on the command line, the list displayed shows the newly saved file. You can also read the files by using the file show command.
Saving a file to an FTP server can be accomplished by specifying the destination in URL format. The syntax for these commands is as follows:
show configuration | save <filename> Output file name (or URL)
file list <[Enter]>
file show <filename> Filename to display
The example below shows the process of saving the file, both locally and via FTP. The file named my_local_file has been created to
include the output of the show configuration command and is saved locally. This is done by using the command show
configuration | save my_local_file. This command will create a file named my_local_file and will redirect the output of the
show configuration command. To list the files saved on the router, the user can use the file list command. If the user wants to
display the contents of the newly saved file named my_local_file, he or she can do this by typing the file show my_local_file
command.
trim
The trim option lets you trim columns off of the displayed output. The syntax for this is as follows:
show configuration | trim <columns> Number of columns to trim
In the example below, the user has typed the show configuration command with the trim set to three. Notice that the first three letters of
version and system are no longer displayed. They have been trimmed off.
lab@Chicago> show configuration | trim 3
sion 4.3R1.4;
tem {
host-name Chicago;
ports {
console type vt100;
www.ebook-converter.com
search and manipulate the on-screen data. Table 4-2 lists these keyboard sequences.
Table 4-2. Keyboard Sequences for Searching and Manipulating On-screen Data
Function Keyboard Sequence
List the keyboard sequences available when the -(more)- prompt is displayedh
Display output all at once (like no-more option) N
Repeat previous search for a string n
Search for a text string (like match option) m or M
Search, ignoring a text string (like except option) e or E
Do not redisplay prompt after displaying the output (like hold option) H
Clear match conditions and display complete output c or C
Save output to a file (like save option) s or S
Scroll down one line Enter, k, Ctrl-m, Ctrl-n, down arrow
Scroll down a half screen Tab, d, Ctrl-d, Ctrl-x
Scroll down whole screen Space, Ctrl-f
Scroll down to bottom of output Ctrl-e, G
Display previous line output j, Ctrl-h, Ctrl-p, up arrow
Scroll up a half screen u, Ctrl-u
Scroll up a whole screen b, Ctrl-b
130
4. The Command Line Interface
do this by typing the / and entering the string to search for. In this case, the user types bgp when Search For: is displayed. The result is that
the first occurrence of bgp is displayed on the screen.
lab@Chicago> show configuration
version 5.0R2.4;
system {
host-name Chicago;
login {
class superuser {
permissions all;
}
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “lGdV/”; # SECRET-DATA
Search for: bgp
bgp {
traceoptions {
file 539test4again2;
flag all;
}
local-address 2.2.2.2;
group IPV4_IBGP_ONLY {
type internal;
family inet {
unicast;
}
family inet-vpn {
unicast;
}
neighbor 4.4.4.4 {
traceoptions {
file vpntest;
flag all;
www.ebook-converter.com
}
}
}
}
ospf {
Monitoring Users
www.ebook-converter.com
sources from some peers and accept them from others or set tracing options on
one group and not the others.
To configure MSDP groups, include one or more of the following statements at
the [edit protocols msdp group group-name] hierarchy level:
[edit protocols msdp]
group group-name {
disable;
export [ policy-name ];
import [ policy-name ];
local-address address;
mode <(mesh-group | standard)>;
traceoptions {
file name <replace> <size size> <files number> <no-stamp>
<(world-readable | no-world-readable)>;
traceflag flag <flag-modifier> <disable>;
}
peer address; {
disable;
export [ policy-name ];
import [ policy-name ];
local-address address;
traceoptions {
www.ebook-converter.com
Description
Define an MSDP peer group. MSDP peers within groups share common
traceoptions, if present and not overridden for an individual
peer with the peer statement. To configure multiple MSDP groups, include multiple group
statements.
By default, the group's options are identical to the global MSDP options.
To override the global options, include group-specific options within the
group statement.
The group must contain at least one peer.
Options
group-name—Name of the MSDP group.
The remaining statements are explained separately in this chapter.
Usage Guidelines
133
4. The Command Line Interface
Configuration Mode
The configuration mode is used to enable JUNOS software features, such as interfaces, generic routing information, and routing protocols,
among others. From the operational mode, you can find your way into the configuration mode where you can enable functions and begin to see
your router operate. The following sections describe the navigation, hierarchy, and use of the configuration mode. You will also find out how to
manipulate configuration files, how and where the files are stored, and how to use these files, once they are created.
www.ebook-converter.com
Exiting configuration mode
lab@Chicago>
Configuration-Mode Hierarchy
The configuration mode offers many features and supports a wide range of configurations. It also serves as the doorway to enable the many
features that JUNOS brings to the core Internet space. This section highlights the available commands in the configuration mode and gives a
brief description of each command's functionality. The following example shows the output when typing a question mark at the configuration-
mode prompt. The available commands for the configuration mode are listed.
[edit]
lab@Chicago# ?
Possible completions:
<[Enter]> Execute this command
activate Remove the inactive tag from a statement
annotate Annotate the statement with a comment
commit Commit current set of changes
copy Copy a statement
deactivate Add the inactive tag to a statement
www.ebook-converter.com
lab@Chicago#
www.ebook-converter.com
lab@Chicago> file list /var/db/config/
juniper.conf++
juniper.conf.4.gz
juniper.conf.5.gz
juniper.conf.6.gz
juniper.conf.7.gz
juniper.conf.8.gz
juniper.conf.9.gz
juniper.conf.post-install
juniper.conf.pre-install
lab@Chicago> file show ?
Possible completions:
<filename> Filename to display
lab@Chicago> file show /config/juniper.conf
version 5.1R1.4;
system {
host-name Chicago;
136
4. The Command Line Interface
[edit]
lab@Chicago# rollback 2
load complete
lab@Chicago# commit
commit complete
[edit]
lab@test#
Note
When using the rollback command without a number, the router will go back to the last committed configuration, regardless of any
unsaved changes. Before using the rollback command, you can view the contents of the saved files by using the file show
command. This can be useful in helping you to rollback to a specific configuration file. Also, using the show command with
rollback | compare can be helpful in displaying the differences between the current candidate configuration and the previously
saved configuration. The following example shows the output from of a show | compare rollback 0. The differences are
identified by the + (added) and – (removed) signs. These actions will take place, if the file is committed.
[edit]
lab@Chicago# show | compare rollback 0
version 5.1R1.4;
system {
- host-name Chicago;
+ host-name replace_Chicago
www.ebook-converter.com
+ = Active Route, - = Last Active, * = Both
10.0.0.0/24 *[IS-IS/18] 3d 11:20:48, metric 30, tag 2
> to 10.0.21.1 via ge-1/0/0.0
10.0.1.0/24 *[IS-IS/18] 3d 11:20:48, metric 30, tag 2
to 10.0.21.1 via ge-1/0/0.0
save
The first example below saves the configuration file on the router; the second example saves the configuration file to an FTP server.
www.ebook-converter.com
The user lab saves a file named testfile locally.
[edit]
lab@Chicago# save testfile
Wrote 94 lines of configuration to 'testfile'
Here the file is saved to an FTP server:
[edit]
lab@Chicago# save ftp://192.168.161.9/testftp
Receiving ftp://192.168.161.9/testftp (1832 bytes): 100%
1832 bytes transferred in 0.0 seconds (2.42 MBps)
Wrote 94 lines of configuration to 'ftp://192.168.161.9/testftp'
138
4. The Command Line Interface
lab@Chicago# annotate group external externalannotation
[edit protocols bgp]
lab@Chicago# show
group internal {
type internal;
local-address 192.168.20.1;
neighbor 192.168.16.1;
}
/* externalannotation */
group external {
type external;
peer-as 2;
neighbor 10.0.23.2;
copy
The copy feature can be quite useful. If you need to add many PVCs or add several users, instead of typing each one in individually, you could
use the copy command to create new entries. The example below demonstrates copying the user named lab to a new user named labcopy:
[edit]
lab@Chicago# copy system login user lab to user labcopy
delete
The following command will delete the group named external from the protocols bgp hierarchy. If you wanted to disable bgp
completely, you could use the delete protocols bgp command.
[edit]
lab@Chicago# delete protocols bgp group external
rename
The rename parameter does exactly that—it allows you to change the name of a particular parameter without having to delete it. The example
www.ebook-converter.com
below renames the user labcopy to labcopy2:
[edit system login]
lab@Chicago# rename user labcopy to user labcopy2
insert
The insert command comes in very handy when dealing with the arrangement and order of lines in the configuration file, especially when
dealing with terms in policies. The insert command gives users the ability to move lines around and place them before or after other lines in
the configuration file. The following example shows how you can move and insert a line before another in the configuration file.
Note
The insert command does not create new lines of configuration. In order for lines to be placed before or after other lines, the lines
must already exist in the configuration file. In other words term 3 in this example must already be in the configuration before it can
be inserted before term 2.
[edit policy-options policy-statement insert_test]
lab@Chicago# show
term 1 {
from protocol static;
}
Downloader demo watermarks
then accept;
term 2 {
from protocol bgp;
then accept;
}
term 3 {
from protocol ospf;
139
4. The Command Line Interface
then accept;
}
lab@Chicago# insert term 3 before term 2
[edit policy-options policy-statement insert_test]
lab@Chicago# show
term 1 {
from protocol static;
then accept;
}
term 3 {
from protocol ospf;
then accept;
}
term 2 {
from protocol bgp;
then accept;
}
www.ebook-converter.com
permissions all;
}
inactive: user lab {
uid 2000;
[edit system login]
lab@Chicago# activate user lab
[edit system login]
lab@Chicago# show
class superuser-local {
permissions all;
}
user lab {
uid 2000;
load merge
The first output below shows the configured interfaces. At this time, the only interface is ge-1/0/0. When the load merge command is
used, the file named interfaces will be combined with the candidate configuration file. The result in this example is the addition of the so-
140
4. The Command Line Interface
6/0/0 interface.
[edit]
lab@Chicago# show interfaces
ge-1/0/0 {
unit 0 {
family inet {
address 10.0.21.2/24;
}
family iso;
}
}
[edit]
lab@Chicago# load merge interfaces
load complete
[edit]
lab@Chicago# show interfaces
ge-1/0/0 {
unit 0 {
family inet {
address 10.0.21.2/24;
}
family iso;
}
}
so-6/0/0 {
unit 0 {
family inet {
address 10.0.23.1/24;
}
family iso;
}
}
www.ebook-converter.com
load replace
The load replace command is used to replace specified sections within the configuration file. The sections to be replaced need to be
marked with replace: tags. After completing the load replace, the inet address associated with the ge-1/0/0 interface has been
changed.
[edit]
lab@Chicago# show interfaces
ge-1/0/0 {
unit 0 {
family inet {
address 10.0.21.2/24;
}
family iso;
Contents of the replace_ge_inef file
interfaces {
replace:
ge-1/0/0 {
unit 0 {
family inet {
[edit]
lab@Chicago# load replace replace_ge_inet
load complete
141
4. The Command Line Interface
[edit]
lab@Chicago# show interfaces
ge-1/0/0 {
unit 0 {
family inet {
address 10.0.44.2/24;
}
family iso;
load override
The load override command is used for overwriting the complete configuration file. In the first part of the example below, the current
configuration has the system host-name set to Chicago, and a user account setup for lab. The load file override has only a system host-
name set and the services enabled. When the load override command is used, the filename override will overwrite the candidate
configuration completely.
[edit]
lab@Chicago# show
version 5.1R1.4;
system {
host-name Chicago;
login {
class superuser-local {
permissions all;
}
user lab {
uid 2000;
class superuser;
[edit]
lab@Chicago# load override override
load complete
[edit]
www.ebook-converter.com
lab@Chicago# show
system {
host-name override;
login {
class superuser-local {
permissions all;
}
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “$ /”; # SECRET-DATA
}
}
}
services {
ftp;
ssh;
telnet;
}
}
Note
142
4. The Command Line Interface
The load command is dependant on the level of hierarchy. If you are in the middle of the hierarchy and try loading a configuration
with higher-level commands in it, it will error out. Therefore, this command will ONLY run at the top level.
[edit]
lab@Chicago# load override terminal
[Type ^D to end input]
system {
host-name override;
login {
class superuser-local {
permissions all;
}
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “$ /”; # SECRET-DATA
}
}
}
services {
ftp;
ssh;
telnet;
}
}
load complete
Note
The terminal parameter is available with all three load commands.
www.ebook-converter.com
The ability to create configuration groups is a feature that can be used to make the configuration of bulk items much easier than adding a
separate entry for each parameter. The configuration groups will allow you to build a group that has certain characteristics. You can then apply
those features to many sections of the configuration by associating the group with the parameter. When using configuration groups, the section
to which you apply the group will inherit the features that are enabled within the group.
Groups are created in configuration mode. You type the set groups command, give the group a name, and define the parameters that should
be associated with the group. The syntax for configuring a group is as follows:
set groups <group_name> Group name
After creating the group, you need to apply the group to an item or items within the configuration. The syntax for doing this is as follows:
set interfaces apply-groups <value> Groups from which to inherit
configuration data
The following example shows how to configure a group and apply it to an interface. The group created is called encap_fr, and we have
assigned encapsulation frame relay to the group. By doing this, any interface that we apply the group to will inherit the
encapsulation frame relay parameter.
[edit]
lab@Chicago#set groups encap_fr interfaces <so*> encapsulation frame-relay
[edit]
143
4. The Command Line Interface
interfaces {
<so*> {
encapsulation frame-relay;
interfaces {
so-6/0/0 {
apply-groups encap_fr;
unit 0;
}
so-6/0/1 {
unit 0;
}
so-6/0/2 {
unit 0;
}
so-6/0/3 {
unit 0;
www.ebook-converter.com
Time zone for Transdniestria
set system time-zone <time-zone> Europe/Samara
Time zone for Moscow+01 - Caspian Sea
set protocols bgp traceoptions flag aspath
set protocols bgp group <group_name> traceoptions flag aspath
set protocols bgp group <group_name> neighbor <address> traceoptions flag aspath
set policy-options as-path <aspath_name>
Name to identify AS path regular expression
set routing-instances <instance_name> protocols bgp traceoptions flag aspath
set routing-instances <instance_name> protocols bgp group <group_name> traceoptions flag aspath
set routing-instances <instance_name> protocols bgp group <group_name> neighbor <address> traceoptions flag
Chapter Summary
This chapter introduced the CLI of the Juniper Networks router. It examined the hierarchy and discussed the different modes available for use in
the CLI. The operational mode provides a mechanism for examining status and retrieving statistics about the router. The configuration mode, on
the other hand, gives the ability to turn features on the router on and off. The functional differences between each of the modes were explained
through many examples of navigation through the CLI. This chapter served as a tool to help familiarize you with the CLI and to introduce the
concept of the advanced configuration-management features that set the Juniper Networks router apart from the products of other vendors.
Bibliography
Downloader demo watermarks
Case Study: User and Access Configuration
This case study shows a simple basic configuration of a Juniper Networks router. This configuration explains how to configure a user, enable
some system services like Telnet, FTP, and SSH, and enable the fxp0 management interface for IP connectivity. This basic configuration is
implemented in configuration mode.
144
4. The Command Line Interface
The first statement creates a user named lab. When creating the user, the authentication plain-text will prompt you to enter and
verify a password for the user. The second set of three statements are individual statements that are used to enable Telnet, FTP, and SSH. The
default behavior for the router is with these services disabled. Lastly, we configure the fxp0 management interface to allow IP connectivity to
the router.
Note
The sample configuration output assumes that a console will be connected directly to the router or user access via IP to the router will
be within the same network segment. If remote access from another network is required, you would need to configure a routing
feature of some kind to make that happen. You can refer to Chapter 8 for details on routing configurations.
[edit]
lab@Chicago# set system login user lab class superuser authentication plain-text-password
New password:
Retype new password:
[edit]
lab@Chicago# set system services telnet
[edit]
lab@Chicago# set system services ftp
[edit]
lab@Chicago# set system services ssh
[edit]
lab@Chicago# set interfaces fxp0 unit 0 family inet address 192.168.161.16/24
www.ebook-converter.com
version 5.1R1.4;
system {
login {
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “$.”; # SECRET-DATA
}
}
}
services {
ssh;
}
}
interfaces {
fxp0 {
speed 100m;
link-mode full-duplex;
unit 0 {
encapsulation 802.3-llc;
family inet {
145
[ch04bib01] Ericsson IP Infrastructure, AXI-520/580 course material
[ch04bib02] www.juniper.net
www.ebook-converter.com
www.ebook-converter.com
Figure 5-1. The Juniper Networks M40 Craft Interface
There is some variation in the layout of the craft interface within the Juniper Networks M-Series router family. As is shown in Figures 5-
2 and 5-3, the craft interface for the M160 has no management interface ports. The management interfaces for the M160 are built into
the connector interface panel (CIP), which inhabits a slot running down the left side of the chassis, parallel to the bank of FPCs.
www.ebook-converter.com
Figure 5-4. The Juniper Networks M20 Craft Interface
148
5. Router Access and System Administration
www.ebook-converter.com
lab@Chicago# set insecure
The default speed for the console connection is 9,600 baud. The following example shows the command completions for setting the
connection speeds. By using the question mark, the valid completions for any command string can be accessed from any point within
the JUNOS CLI.
[edit system ports console]
lab@Chicago# set speed ?
Possible completions:
115200 Standard terminal at 115200 baud
19200 Standard terminal at 19200 baud
38400 Standard terminal at 38400 baud
4800 Standard terminal at 4800 baud
57600 Standard terminal at 57600 baud
9600 Standard terminal at 9600 baud
If the baud rate on the console port is changed, any user logged in through that port will immediately be disconnected once the change is
committed. The configuration sample below shows how to set the link speed for the console port to 19.2Kbps. It also shows user lab
being logged off once the change is committed:
[edit system ports console]
Chicago (ttyd0)
login:
By default the terminal type is unknown and in the JUNOS world this setting is compatible with most vt100 emulators. Depending on
the type of terminal being used to configure the router, it may be necessary to change the default terminal type. In situations where
something other than a vt100 emulator is being used, use the set type command at the [edit system ports console]
hierarchy level to change the terminal type setting. The options for terminal type are ansi, vt100, and smallterm. If one of these
three is specified, the screen size is set at 80 columns by 24 rows. It is also possible to specify xterm, which will change the screen size
to 80 columns by 65 rows. The configuration sample below shows the terminal type set to xterm:
Note
The set speed command is hidden in JUNOS 5.1 and is not supported in JUNOS 5.3 for the console and auxiliary ports.
[edit system ports console]
lab@Chicago# set type ?
Possible completions:
ansi ANSI-compatible terminal
small-xterm Small (24 line) xterm window
vt100 VT100-compatible terminal
xterm Large (65 line) xterm window
www.ebook-converter.com
speed 19200;
type xterm;
www.ebook-converter.com
configuration, the most common method of configuring a router is through a carefully controlled and protected management network.
This arrangement is called a management LAN, to which the Juniper Networks router would connect through the aforementioned fxp0
interface. Due to the popularity of the IP protocol, the management LAN is the most commonly used method of accessing a Juniper
Networks router. The out-of-band management network, if it is well designed, will usually have its own resources provisioned. In other
words, it will not consume the same bandwidth that is reserved for customer traffic. Refer to Figures 5-1 through 5-6 to identify the
location of the management Ethernet connection on the craft interface. Juniper Networks routers that support redundant routing engines
will have two management Ethernet connections on the craft interface.
Like the auxiliary port, the management Ethernet connection is disabled by default. To enable this interface, it is necessary to build a
configuration for it. This configuration is built under the [edit interfaces fxp0] hierarchy level and is described in the
following sections. It is important to note that configuration of the management Ethernet (fxp0) connection is a prerequisite for
accessing the router through Telnet sessions, SSH, or FTP across the management LAN. These protocols and their use in relation to a
Juniper Networks router will be discussed later in this chapter. Sections 5.1.3.1 and 5.1.3.2 describe the physical and logical components
of configuring the management Ethernet connection.
Note
This chapter only covers the minimal commands needed to configure the fxp0 interface. Chapter 7 goes into greater detail on
the steps involved in configuring a fast Ethernet interface.
www.ebook-converter.com
[edit interfaces fxp0]
lab@Chicago# show
speed 100m;
By default, the management interface autonegotiates the link mode. In other words, it will adapt to the link mode of the device at the
other end of the wire, be it full- or half-duplex. As was the case with link speed, some vendor products do not readily adapt to the
autonegotiation of link mode. Therefore, to configure either full- or half-duplex mode explicitly, use the set link-mode command at
the [edit interfaces fxp0] hierarchy level. The example below shows how to set the link mode to full-duplex:
[edit interfaces fxp0]
lab@Chicago# set link-mode full-duplex
[edit interfaces fxp0]
lab@Chicago# show
speed 100m;
link-mode full-duplex;
It is possible to include a relevant description of the interface using the set description command under the [edit
interfaces fxp0] hierarchy level. Any description added is visible using the show interfaces command, but will have no
impact on the functionality or the performance of the fxp0 interface. In other words, it will be treated as a comment on the interface. If
152
5. Router Access and System Administration
lab@Chicago# show
speed 100m;
link-mode full-duplex;
description “Management link to London”;
By default, the router's management Ethernet interface (fxp0) uses the MAC address that is hard-coded into its Ethernet card. To see
this address, use the show chassis mac-address operational-mode command. To change the management Ethernet interface's
MAC address, use the set mac command at the [edit interfaces fxp0] hierarchy level. When a MAC address is added, it
must be in one of the two following hexadecimal formats: 00:99:88:77:66:55 or 00.99.88.77.66.55. In the configuration
sample below, the default MAC address, which is burned into the NIC of fxp0, is being overridden and set to 12:d4:23:5a:aa:87.
[edit interfaces fxp0]
lab@Chicago# set mac 12:d4:23:5a:aa:87
[edit interfaces fxp0]
lab@Chicago# show
description “Management link to London”;
speed 100m;
link-mode full-duplex;
mac 12:d4:23:5a:aa:87;
The output from the show command above is cumulative in that it gives us the settings for all the changes made in this section.
Logical Characteristics
For a physical interface to function, at least one logical interface must be configured. All Juniper Networks fast-Ethernet interfaces
support multiple logical interfaces; with fxp0, however, normally only one is used (unless VLAN tagging has been enabled). The
following configuration sample contains the statement unit 0. This identifies logical interface 0. All settings that precede the unit
number are pertinent to the physical interface and will therefore affect all logical interfaces. All settings that follow the unit number are
pertinent only to the logical interface specified by the unit number. The commands relevant to fxp0, our management connection, are
described in the paragraphs below.
www.ebook-converter.com
Each logical interface can have multiple protocol families and must have at least one protocol family configured. The management
interface will normally be configured with the inet family, as is shown in the following configuration sample. The inet family is the
IP protocol stack and includes the major routing protocols, OSPF, BGP, and Routing Information Protocol (RIP), as well as Internet
Control Message Protocol (ICMP) messages. To configure the inet family, include the set family command at the [edit
interface fxp0 unit <unit #>] hierarchy level. Other protocol families available include iso—which is needed for running
the IS-IS protocol, and mpls—which is needed to configure MPLS across an interface. The option of configuring protocol families
other than inet exists; however, this option is rarely used. Under normal situations, only TCP/IP protocols are utilized across the
management LAN. In the following example, the help feature is used to view valid command completions when adding a protocol
family to an interface. After viewing the valid options, family inet is chosen to allow IP protocols traffic across logical interface 0
for physical interface fxp0.
[edit interfaces fxp0 unit 0]
lab@Chicago# set family ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
> inet Internet protocol (IPv4) parameters
> inet6 IPv6 protocol parameters
> iso OSI ISO protocol parameters
> mpls MPLS protocol parameters
[edit interfaces fxp0 unit 0]
Note
If the IS-IS protocol were being used across the management LAN, then it would be necessary to configure the iso family
and specify a network entity title (NET) for the node address.
To specify an address, use the set address <address/subnet mask> command at the [edit interfaces fxp0 unit
<unit #> family <protocol>] level of the JUNOS hierarchy. In the configuration sample below, we have set an IP address of
192.168.151.10 with a 24-bit subnet mask:
[edit interfaces fxp0]
lab@Chicago# set unit 0 family inet address 192.168.151.10/24
The following example shows the settings for all the changes made in this section.
[edit interfaces fxp0]
lab@Chicago# show
description “Management link to London”;
speed 100m;
link-mode full-duplex;
mac 12:d4:23:5a:aa:87;
unit 0 {
family inet {
address 192.168.151.10/24;
}
}
System Administration
System administration can be interpreted to encompass a very broad range of activities. For the purposes of this chapter, we will focus
primarily on the elements of system administration that are typically in the hands of a network engineer and involve securing the router
www.ebook-converter.com
from unauthorized access while providing convenient access to individuals responsible for managing the functions of the device.
Unauthorized access can take one of two forms. The first form is the least common but, because of Hollywood, most glamorized and is a
situation in which an unauthorized user gains access to the router. The more common and less-dramatized form of unauthorized access
is any situation in which an authorized user executes configuration statements beyond his ability or job description.
154
5. Router Access and System Administration
4. Set Allow and Deny commands.
The following sections describe these steps.
www.ebook-converter.com
Keywords are used to represent a specific command or group of commands that can be typed at the CLI. The keywords can be used to
create custom login classes for users with special access needs. When creating custom login classes, it is possible to configure access-
privilege levels using keywords. Individual commands can be explicitly denied or allowed within those access privilege levels, and the
timeout value for idle sessions can be configured. The configuration sample below shows the syntax of the options available for creating
a login class:
[edit]
lab@Chicago# set system login class bigdogs ?
Possible completions:
<[Enter]> Execute this command
allow-commands Regular expression for commands to allow explicitly
+ apply-groups Groups from which to inherit configuration data
deny-commands Regular expression for commands to deny explicitly
idle-timeout Maximum idle time before logout (minutes)
+ permissions Set of permitted operation categories
To define a login class (give it a name), use the set class command. The configuration sample below shows the definition of a login
class bigdogs:
[edit system login]
lab@Chicago# set class bigdogs
www.ebook-converter.com
login:
Operational-mode monitor commands are a way to watch a protocol, view traffic crossing an interface, or track a log file as it is being
built. If the user is running an operational-mode monitor command, such as monitor traffic or monitor interfaces, the
session is immune to the normal idle-timeout rules. This allows users to launch and watch the output from the monitor commands
without having to type anything to keep the session alive.
Note
When a user is logged out due to inactivity, any uncommitted changes he or she has made are neither lost, nor committed. The
changes are kept as part of the JUNOS candidate configuration and can be manipulated by any subsequent user.
156
5. Router Access and System Administration
When specifying permissions, use the keywords from the list below. Each of these keywords has a set of commands associated with it.
It is important to remember that the permissions keywords are not cumulative. In other words, if a user is assigned permissions that
allow him to change the configuration at the interfaces level of the JUNOS hierarchy, he most also be given the ability to enter the
configuration mode to get there. For each class, be sure to include all functions needed. New administrators commonly make the
mistake of leaving out essential functions like configure to enter configuration mode and view to display chunks of the
configuration. Type a question mark to view all command completion options. The result generates both a list of the keywords and a
brief description of each, as is shown in the CLI output below:
[edit system login class bigdogs]
lab@Chicago# set permissions ?
Possible completions:
[ Open a set of values
admin Can view user accounts
admin-control Can modify user accounts
all All permission bits turned on
clear Can clear learned network information
configure Can enter configuration mode
control Can modify any configuration values
edit Can edit full files
field Special for field (debug) support
firewall Can view firewall configuration
firewall-control Can modify firewall configuration
floppy Can read and write the floppy drive
interface Can view interface configuration
interface-control Can modify interface configuration
maintenance Can perform system maintenance (as wheel)
network Can access the network
reset Can reset and restart interfaces and processes
rollback Can rollback for depth greater than zero
routing Can view routing configuration
routing-control Can modify routing configuration
secret Can view secret configuration
www.ebook-converter.com
secret-control Can modify secret configuration
security Can view security configuration
security-control Can modify security configuration
shell Can start a local shell
snmp Can view SNMP configuration
snmp-control Can modify SNMP configuration
system Can view system configuration
system-control Can modify system configuration
trace Can view trace file settings
trace-control Can modify trace file settings
view Can view current values and statistics
Logical
Description
Operator
- This character is always placed at the beginning of an expression. It is used to indicate where the command must begin and is
used in situations where there could be multiple valid commands with the same beginning word that are executable at
different hierarchical levels within the configuration.
| This character is used to separate multiple commands within an allow-commands or deny-commands statement. It
functions as a logical OR.
[] These characters are used to indicate a range of letters or digits and are commonly used when it is necessary to restrict show
commands to a certain group.
() These characters indicate hierarchy within a regular expression. The commands they surround are to be evaluated first. The
result is then evaluated as part of the overall expression.
$ This character is always applied at the end of a command and is used to indicate the need for an exact match that stops at the
point of the $. For example, allow-commands "show interfaces $" means that the user cannot issue show
interfaces brief or show interfaces detail.
The configuration fragment below demonstrates the use of the | operator within a regular expression that is being used for the allow-
commands. The login class that is defined in the sample below would be appropriate for employees responsible for software
maintenance on the Juniper Networks router. The permissions settings deny access to all commands except show, but the allow-
commands setting explicitly permits the user to upgrade software. Remember that in order for a software update to take effect, the
router must be rebooted.
[edit system login class admin-trainee]
lab@Chicago# set permissions view
[edit system login class admin-trainee]
lab@Chicago# set allow-commands “request system software add | request system
reboot”
www.ebook-converter.com
[edit system login class admin-trainee]
lab@Chicago# show
permissions view;
allow-commands “request system software add | request system reboot”;
The next example shows the layout of a login class that will give all users assigned to it the normal administrative assistant privileges as
defined by keywords clear, network, reset, trace, and view, plus the ability to reboot or halt the router as needed:
[edit system login class orin-admin]
lab@Chicago# set permissions [clear network reset trace view]
Note
As soon as the account has been built and the configuration committed, JUNOS constructs a home directory for the user. The
home directory is located under /var/home/<username> in the UNIX directory structure.
www.ebook-converter.com
complete description of the login-class concept.
[edit system login]
lab@Chicago# set user gsondere class admin-trainee
159
5. Router Access and System Administration
range of 1,000 to 64,000 and must be unique within the router. If no UID is assigned to a username, JUNOS assigns one when the
configuration is successfully committed. The sample below shows the addition of a valid UID to the configuration for user gsondere.
[edit system login user gsondere ]
lab@Chicago# set uid 1001
[edit system login user gsondere]
lab@Chicago# show
full-name “Gordon Sonderegger”;
uid 1001;
class admin-trainee;
www.ebook-converter.com
[edit system login user gsondere]
lab@Chicago# show
full-name “Gordon Sonderegger”;
uid 1001;
class superuser;
authentication {
encrypted-password “$1$oA5MLkba$g6j.laUNOl8EV2kK1QjXK0”; # SECRET-DATA
}
An account for the user root is by default built into the configuration and by default has no password. However, it is highly
recommended that one immediately set up password protection for the root account. The password for account root is configured using
the root-authentication statement at the [edit system] hierarchy level. This is a critical task in the responsibilities of a
system administrator and should not be overlooked.
[edit system]
lab@Chicago# set root-authentication plain-text-password
New password:
Retype new password:
[edit system]
lab@Chicago# show
}
encrypted-password “$1$ccZHntfP$TcMEHnZp04/FfpVYJbnPX/”; # SECRET-DATA
login {
class admin-trainee {
permissions view;
160
5. Router Access and System Administration
allow-commands “request system software add | request system reboot”;
}
class bigdogs {
idle-timeout 30;
permissions all;
}
class orin-admin {
permissions [ clear network reset trace view ];
allow-commands “request system halt | request system reboot”;
}
class russell-admin {
permissions [ network reset trace view ];
deny-commands “^set|^delete|^clear”;
}
user gsondere {
full-name “Gordon Sonderegger”;
uid 1001;
class admin-trainee;
}
}
In the configuration samples below, four user accounts are shown. For each of the users, a full name was added for clarity. The first two
users were given a password using the plain-text option. The third was given a password using the encrypted option. These samples
demonstrate some of the settings combinations available when adding users to the system.
[edit system login]
lab@Chicago# show
user branimir {
full-name “Branimir Maric”;
uid 1001;
class superuser;
authentication {
encrypted-password “awertcawexwer54gfwe”; # SECRET-DATA
www.ebook-converter.com
}
}
user mario {
full-name “Mario Jurcevic”;
uid 1002;
class admin-trainee;
authentication {
encrypted-password “786fvo8jo7674cd6u744*%&vo”; # SECRET-DATA
}
}
user drazen{
full-name “Drazen Kedmenec”;
uid 1003;
class admin-trainee;
authentication {
encrypted-password “iuycrbqewrts123654vuqwuq” # SECRET-DATA
}
}
user ladislov {
full-name “Ladislov Topic”;
As was mentioned previously, the unauthorized login class may seem ridiculous at first. Why would an administrator want to build an
account for a user and then give him no permissions? In truth, there could be several valid reasons for adding this configuration element.
First, there may be future plans for allowing the user to execute commands on the router, at which time the user's login class will be
161
5. Router Access and System Administration
updated to reflect the new responsibilities. A second possible reason could be a system administrator's desire to see what the user will
attempt to access. This could be tracked by turning on the logging features that are built into JUNOS. Logging features are described in
Section 5.2.8.
Password Recovery
Regardless of the ability and experience of the system administrator, organizational changes can sometimes make password recovery a
necessity. For those who have never encountered the term, password recovery is a means of gaining access to a router when a valid
password is unknown. Obviously, having a built-in back door such as this puts the entire network at risk for a security breach.
Therefore, measures must be taken to secure the Juniper Networks router from this type of unauthorized access. The measures should
include placing all critical network devices behind a locked door. This simple measure is an often-overlooked administrative duty.
Having explained the need for locked-door security, we present the steps below. They describe one possible method of gaining access to
the router without a valid password. These steps should only be used as a last resort and certainly at off-peak times in a production
network as they do require a reboot of the router.
1. First, obtain physical access to the router. This procedure cannot be completed through a remote-access connection as it requires
both a connection to the console port and a physical reboot of the router.
2. Next, power-cycle the router and boot it up in single-user mode by typing -s at the boot: prompt as is shown below:
Will try to boot from :
PCMCIA ATA Flash Card
Compact Flash
Primary IDE Hard Disk
Ethernet
Boot Sequence is reset due to Powerup
www.ebook-converter.com
Default: 0:ad(0,a)/kernel
boot: -s
3. The router will go through its usual startup sequence. Then, there will be a prompt for pathname with the following syntax: Enter
pathname of shell or RETURN for sh:
4. When this prompt is seen, enter the following string: /usr/libexec/ui/recovery-mode
5. This will drill down through the directory structure and execute a premade script for password recovery. The system will continue
to boot as normal and bring the user to the following prompt: root@Chicago>.
6. At this point it will be possible to drop into configuration mode using the edit command. From there, one can make changes to
usernames and passwords as needed.
In the configuration sample below user jsclass is an administrator and has forgotten his password. He followed the steps listed above
to gain access to the CLI as root. He will now delete and rebuild his username, making sure to add a more memorable password.
root@Chicago> edit
Entering configuration mode
[edit]
[edit]
root@Chicago# set system login user jsclass class superuser authentication plain-text-password
New password:
Retype new password:
Once the changes are complete, it is necessary to commit. Once the commit completes, a request system reboot command is
162
5. Router Access and System Administration
necessary to get out of single-user mode. The sample below shows execution of the reboot command:
[edit]
root@Chicago# commit
Commit complete
root@Chicago# exit
Exiting Configuration mode
Note
Juniper Networks' Technical Documentation Set version 5.1 includes a few other steps as part of the password-recovery
process. These steps involve manually mounting specific software processes while in the UNIX shell. Once started, these
processes will permit the M-Series router to forward traffic while the password-recovery steps are being executed. For a
complete list of the processes to be mounted, see Juniper Networks' Technical Documentation Set.
Authentication Methods
RADIUS and Terminal Access Controller Access Control System + (TACACS+) are authentication methods that rely on network
connectivity as opposed to local machine login/password authentication. The Juniper Networks router can be configured to authenticate
access attempts through Telnet using RADIUS or TACACS+, or both. In situations where both have been configured, it is also possible
to specify which method to try first. NTP should also be configured for either of the authentication methods to work. Both TACACS+
and RADIUS rely on a timestamp to keep people from sniffing packets and using them again to gain access, so if the clocks are not
synchronized, then authorization will fail. NTP configuration is described in detail in Section 5.2.9. The following sections introduce a
bit of operational theory for the two authentication methods and then the statements that will be used to configure each on the router.
RADIUS
www.ebook-converter.com
RADIUS uses the transport protocol UDP to move requests for access from the Juniper Networks router to the RADIUS server for
authentication. The password keyed in by the user is included in the request. At the RADIUS server, the password is checked against
the database to determine the legitimacy of the login attempt. If the username and password are valid according to the RADIUS server,
then access to the router is granted. If the username or password is invalid, then access to the router is not granted, and a denial message
is returned to the user. The paragraphs that follow include examples and descriptions of the commands used to configure RADIUS
authentication on the Juniper Networks M-Series routers.
RADIUS authentication is enabled on the router by configuring the location of a RADIUS server. To do this, use the radius-server
statement at the [edit system] hierarchy level. In the example below, the RADIUS server is located at IP address
192.168.100.1. For the sake of clarity, only output pertinent to the RADIUS configuration is listed under the show command
below:
[edit system]
lab@Chicago# set radius-server 192.168.100.1
[edit system]
lab@Chicago# show
radius-server {
192.168.100.1;
163
5. Router Access and System Administration
[edit system radius-server 192.168.100.1]
lab@Chicago# set port 1492
[edit system radius-server 192.168.100.1]
lab@Chicago# show
192.168.100.1 port 1492;
For RADIUS authentication to function, it is necessary to specify a password that the Juniper Networks router can pass to the RADIUS
server. This is used to confirm the identity of the device that is requesting authentication of a potential user. The password must be
configured on both the router and the RADIUS server. On the router it is configured using the secret statement at the [edit
system radius-server <address>] hierarchy level. In the configuration sample below, we used Gabby as the password for
RADIUS-client authentication.
[edit system radius-server 192.168.100.1]
lab@Chicago# set secret gabby
As is shown in the configuration sample below, when the show command is used to view the password, the password has been
encrypted within the configuration:
[edit system radius-server 192.168.100.1]
lab@Chicago# show
192.168.100.1 {
port 1492;
secret “$9$kP5Fn6Au0IUjBE”; # SECRET-DATA
}
It is also possible to configure RADIUS to attempt to authenticate users multiple times. This is accomplished by using the set retry
command as shown below. In this example, the RADIUS server will attempt to authenticate the identity of the user three times.
[edit system radius-server 192.168.100.1 {
lab@Chicago# set retry 3
www.ebook-converter.com
lab@Chicago# show
192.168.100.1 {
port 1492;
secret “$9$kP5Fn6Au0IUjBE”; # SECRET-DATA
retry 3;
}
In some situations it may also be necessary to configure a higher timeout interval. By default, the router will wait three seconds for a
response from the server. Changing the default would be necessary in situations where network latency is expected or when there will
be a high number of users attempting to authenticate through the same server simultaneously. This situation is commonly experienced in
most businesses at around 8:00 A.M. every morning. The timeout interval is set using the set timeout command as is shown below.
In this example, there will be three attempts at authentication, each with a timeout interval of 90 seconds.
[edit system radius-server 192.168.100.1]
lab@Chicago# set timeout 90
164
5. Router Access and System Administration
The Juniper Networks implementation of RADIUS supports some unique attributes. These are known as vendor-specific attributes
(VSAs) and are loosely described in RFC 2138. Juniper Networks VSAs are identified by vendor ID 2636 in the packets sent to the
RADIUS server. This is the vendor ID assigned to Juniper Networks, Inc. The following attributes are unique to Juniper Networks:
juniper-allow-commands: This attribute allows the RADIUS server to be aware of the explicitly configured allow-
commands connected to the login class to which the user belongs. Without this attribute, only the configured permission keywords
would be recognized.
juniper-deny-commands: This attribute allows the RADIUS server to be aware of the explicitly configured deny-commands
connected to the login class to which the user belongs. Without this attribute only the permission keywords would be recognized.
juniper-local-user-name: This attribute allows the RADIUS server to recognize shared user accounts.
Note
Because it uses UDP, RADIUS authentication has less overhead than TACACS+ and is therefore used more frequently in
high-traffic situations. This in no way implies that RADIUS authentication is less secure. It is simply based on a different
transport method.
TACACS+
TACACS+ uses a TCP connection for the transport of the encrypted password and access request. This method of authentication is
used less frequently in high-traffic situations as the TCP connection, by nature, has more overhead and burns up more bandwidth.
This section shows the commands used to configure TACACS+ authentication on Juniper Networks routers. In the first configuration
sample, we enable TACACS+ authentication by specifying the IP address of a TACACS+ server. In the following example, the server is
located at 192.168.100.2. For the sake of clarity, only output pertinent to the TACACS+ configuration is listed under the show
command.
[edit system]
lab@Chicago# set tacplus-server 192.168.100.2
www.ebook-converter.com
[edit system]
lab@Chicago# show
tacplus-server {
192.168.100.2;
}
As with RADIUS, with TACACS+ we must first specify a password to be sent to the server to authenticate the identity of the router that
is requesting authentication of a potential user. This step is necessary in order for TACACS+ authentication to function. We specify a
password using the secret statement as shown below. In this example, we use zappa as the password, but again, when the password
is viewed in the configuration, it is in an encrypted format:
[edit system tacplus-server 192.168.100.2]
lab@Chicago# set secret zappa
[edit system tacplus-server 192.168.100.2]
lab@Chicago# show
192.168.100.2 {
secret “$9$AJL/uEyleW8xdSreW”; # SECRET-DATA
}
www.ebook-converter.com
[edit system tacplus-server 192.168.100.2]
lab@Chicago# set secret zappa
}
Downloader demo watermarks
secret “$9$.fnCtpB1godEy9ApB”; # SECRET-DATA
timeout 45;
single-connection;
192.168.100.1 {
secret “$9$.fnCtpB1godEy9ApB”; # SECRET-DATA
timeout 45;
166
5. Router Access and System Administration
single-connection;
}
192.168.100.3 {
secret “$9$.fnCtpB1godEy9ApB”; # SECRET-DATA
timeout 45;
single-connection;
}
www.ebook-converter.com
means is that a local host can request DHCP information, such as an IP address, subnet mask, and default gateway, and if no DHCP
server resides on the local network, the router will forward the request to a preconfigured DHCP server on a different network or
subnet. It is only necessary to configure the router to be a DHCP relay agent if there are locally attached hosts that rely on DHCP
information from a remote server. If there are no local hosts that require DHCP information, then this configuration step is not
recommended by the authors and is definitely not necessary.
To configure the router to function as a DHCP relay agent, use the set server <ip-address of server> command at the
[edit system dhcp-relay] level of hierarchy. In the example below, the router has local hosts relying on a remote DHCP server
that is located at IP address 40.10.10.5:
[edit system dhcp-relay]
lab@Chicago# set server 40.10.10.5
[edit system dhcp-relay]
lab@Chicago# show
server 40.10.10.5;
Note
The Juniper Networks M-Series router, itself, cannot function as a DHCP server. It can only forward requests for DHCP
information.
Downloader demo watermarks
System Services
By default, the server functionality of common services that would permit remote access is disabled on the Juniper Networks router.
While the client side is enabled by default, the server functionality for Telnet, SSH, and FTP must be enabled under the [edit
system services] level of the JUNOS hierarchy. The following sections describe how to configure the server functionality of these
167
5. Router Access and System Administration
services.
Note
Configuration of the management Ethernet (fxp0) connection is a prerequisite for functioning as a server for Telnet sessions,
SSH, or FTP across the management LAN.
Telnet
The Telnet service is the workhorse of the remote-access world. Through Telnet, it is possible to establish a connection to a device and
generate a screen that looks and functions as if the user had logged directly into the device. In the Juniper Networks world, and in most
other implementations, the Telnet service requires that the user issuing the Telnet request have a valid user account and password on the
target device.
The Telnet service is enabled using the set telnet command as shown below. Keep in mind that enabling Telnet does not open
Telnet sessions; it simply allows sessions to be opened as needed.
[edit system services]
lab@Chicago# set telnet
JUNOS software includes provisions that make it possible to limit the number of simultaneous Telnet connections and set a limit on the
number of connection attempts per minute. The configuration example below shows Telnet enabled with a maximum of three
simultaneous connections and a maximum of ten connection attempts per minute. In these examples, the help feature is used to see the
maximum allowable settings for both the number of simultaneous connections and the number of connection attempts per minute.
[edit system services telnet]
lab@Chicago# set connection-limit ?
Possible completions:
<connection-limit> Maximum number of allowed connections (1..250)
www.ebook-converter.com
[edit system services telnet]
lab@Chicago# set rate-limit ?
Possible completions:
<rate-limit> Maximum number of connections per minute (1..250)
Denver (ttyp0)
login:
168
5. Router Access and System Administration
The string shown below demonstrates the telnet command being executed from within configuration mode, using the run command:
[edit protocols ospf area 0]
lab@Chicago# run telnet 192.168.161.27
Trying 192.168.161.27...
Connected to 192.168.161.27.
Escape character is '^]'.
Melbourne (ttyp0)
login: bonnie
Password:
Last login: Thu Mar 7 08:43:31 from 192.168.161.10
bonnie@Melbourne>
The telnet command was successful and user bonnie was prompted for a username and password to access the Melbourne router.
User bonnie was able to establish this connection because her UID and password had already been configured on the Melbourne
router.
Note
The Juniper Networks implementation of Telnet does not permit Telnet connections to be established by user root. This is a
built in safety feature of the operating system.
SSH
SSH is capable of accomplishing most, if not all, of the tasks that up until a few years ago were traditionally carried out using Telnet.
Because of its encryption features, it is now in common use by both ISP and enterprise network engineers. However, due to U.S.
government restrictions on encryption software, the SSH service is available only on the domestic version of the software. The SSH
www.ebook-converter.com
service is used first to open a connection to a remote router, then to execute individual commands on the remote router. The service
must be running on both Juniper Networks devices involved in SSH communication. To start the SSH service on the Juniper Networks
router, use the set ssh command from the [edit system services] level of hierarchy as is shown in the sample below:
[edit system services]
lab@Chicago# set ssh
As with Telnet, with SSH it is also possible to limit the number of simultaneous SSH connections and set a limit on the number of
connection attempts per minute. The configuration example below shows SSH enabled with a maximum of five simultaneous
connections and a maximum of ten connection attempts per minute. The help function is used to demonstrate the allowable parameters
for these options:
[edit system services ssh]
lab@Chicago# set connection-limit ?
Possible completions:
<connection-limit> Maximum number of allowed connections (1..250)
[edit system services ssh]
lab@Chicago# set connection-limit 5
169
5. Router Access and System Administration
[edit system services ssh]
lab@Chicago# show
connection-limit 5;
rate-limit 10;
After the SSH service has been configured, it can be used from operational mode to establish a connection with another device and run
commands on the device. To establish a connection with a Juniper Networks M-Series router with an IP address of 192.168.161.17
and then run a show chassis hardware command, use the following syntax:
lab@Chicago> ssh 192.168.161.17
RSA key fingerprint is 7d:c7:5c:26:2d:90:12:fe:76:6b:35:3c:ca:b2:87:ea.
Are you sure you want to continue connecting (yes/no)? yes
[email protected]'s password:
Last login: Sun Mar 31 20:38:50 2002
--- JUNOS 5.2R1.4 built 2002-01-30 17:03:27 UTC
---
--- NOTICE: System is running on alternate media device (/dev/ad1s1a).
---
lab@HongKong> show chassis hardware
Hardware inventory:
Item Version Part number Serial number Description
Chassis 21009 M20
Backplane REV 07 710-001517 AB7116
Power Supply A REV 03 740-001465 001221 AC
Power Supply B REV 03 740-001465 001214 AC
Display REV 04 710-001519 AF3244
Host 0 dd00000792cf3401 teknor
SSB slot 0 REV 01 710-001951 AF1358 Internet Processor II
SSB slot 1 N/A N/A N/A backup
FPC 1 REV 01 710-001292 AC5929
PIC 1 REV 07 750-002303 AF7216 4x F/E, 100 BASE-TX
PIC 2 REV 03 750-000603 AA4506 4x OC-3 SONET, SMIR
PIC 3 REV 04 750-000611 AA4272 4x OC-3 SONET, MM
www.ebook-converter.com
FPC 2 REV 01 710-001292 AF3526
PIC 1 REV 06 750-000616 AA6698 1x OC-12 ATM, MM
FPC 3 REV 01 710-001292 AB2174
PIC 0 REV 08 750-001072 AG4470 1x G/E, 1000 BASE-SX
PIC 1 REV 08 750-001072 AC4777 1x G/E, 1000 BASE-SX
lab@HongKong>
The command string below shows user lab closing his SSH session to the Hong Kong router and returning to the Chicago CLI:
lab@HongKong> exit
FTP
JUNOS also contains provisions that allow FTP to be enabled. FTP, for those unfamiliar with the protocol, does exactly what the name
www.ebook-converter.com
launching FTP from a shell is shown next:
lab@Chicago> startshell
%ftp 192.168.161.14
Connected to 192.168.161.17.
220 HongKong FTP server (Version 6.00LS) ready.
Name (192.168.161.17:lab):
331 Password required for lab.
Password:
230 User lab logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
In the command string below, a file called baseline is being pulled through FTP from the Hong Kong router back to the Chicago
router. This file will be placed in the /var/home/lab directory under the filename baseline on the Chicago router.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
171
5. Router Access and System Administration
-rw-r---r--- 1 lab staff 2427 Mar 22 15:42 interfaces
226 Transfer complete.
ftp> mget baseline
mget baseline?
200 PORT command successful.
150 Opening BINARY mode data connection for 'baseline' (1110 bytes).
100% 1110 00:00 ETA
226 Transfer complete.
1110 bytes received in 0.00 seconds (608.30 KB/s)
To end the FTP connection, use the bye command. This will return the cursor to a UNIX shell prompt. From within the UNIX shell, use
the exit command to get back to the CLI.
ftp> bye
221 Goodbye.
% exit
lab@Chicago>
While the protocol is useful in training-lab environments, Juniper Networks does not officially support FTP on the M-Series routers, and
it highly recommends that this service not be enabled on routers used in a production network. FTP is extremely useful in some
situations, such as when passing a new software release from router to router, but it could be exploited in negative ways. Because of its
encryption capabilities, a safer alternative to FTP is the Secure Copy Protocol (SCP).
SCP
SCP accomplishes the same functions as the FTP protocol, but operates through an SSH connection. Therefore, to run SCP, the SSH
service must be enabled on the router that is receiving the connection. See Section 5.2.7.2 for an explanation of how to configure SSH.
The example below shows the command string used to launch an SCP connection from the Chicago router to the Hong Kong router and
push a file called baseline from Chicago to Hong Kong. In this example, the Hong Kong router will function as an SSH server;
therefore, the SSH service must be enabled on Hong Kong.
www.ebook-converter.com
lab@Chicago> file list
.ssh/
baseline
jinstall-5.0R1.4-domestic.tgz
lab@Chicago> file copy baseline scp://192.168.161.17/var/home/lab/.
[email protected]'s password:
baseline 100% |*****************************| 1666 00:00
To confirm that the file has been copied to the Hong Kong router, we can establish an SSH connection and check the home directory of
user lab as is shown in the example below:
lab@Chicago> ssh 192.168.161.17
[email protected]'s password:
Last login: Sun Mar 31 20:40:43 2002 from 192.168.161.30
--- JUNOS 5.2R1.4 built 2002-01-30 17:03:27 UTC
---
--- NOTICE: System is running on alternate media device (/dev/ad1s1a).
---
lab@HongKong> file list
lab@Chicago>
System Logging
System logging is a way to build files that store a record of activity within the router. This feature can track alarms, warning messages,
instances of users logging on and off, specific commands executed by users, and virtually any other event that takes place on the router.
System logging operations are enabled by default and record events that would be of importance to the system administrator, such as
component failure. System logging can be configured to catch more trivial events, such as execution of commands or user login
attempts.
To configure system-logging parameters and control how much information the system archives, use the set syslog <syslog
options> command at the [edit system] level of the JUNOS hierarchy as is shown in the example below. By default, the data
collected will be placed in 128K files. Up to ten of these files will be created as data is collected. Also by default, the only user who can
read the files is the user who created them, the root user, and users with a login class of super-user.
In the example below, some of the default syslog settings are overridden. The files option is used to specify the number of files, up to
five, to be used for the syslog data. The size option allows us to specify the maximum size, up to 5MB, for each of the syslog files. We
have designated these files as world-readable, which will permit all other users to view them.
[edit system syslog]
lab@Chicago# set archive files 5 size 5m world-readable
www.ebook-converter.com
per syslog file is 1GB. The syslog files will be stored in the /var/log/ directory.
Using CLI commands, it is also possible to create other files in which to store syslog information or to redirect syslog data to the console
port or even a specific host. Examples of these configurations are shown below:
[edit system syslog]
lab@Chicago# show
archive size 5m files 5 world-readable;
host 124.35.35.14 {
any emergency;
}
console {
any critical;
}
As was mentioned previously, it is possible to change the default class of messages (type of information being stored) and the severity
level within these classes. To change the class and severity level, it is necessary to use the keywords. The keyword options available are
listed in the command completion example below. This list shows the options for selecting a class of messages.
[edit system syslog]
lab@Chicago# set console ?
Keyword Displays
any All events listed in the seven categories below
Authorization Any attempt to login to the router (successful or otherwise)
change-log Any changes made to the configuration (and committed)
cron Any cron daemon or scheduled task
daemon Any system daemon or background process
ftp Any messages that are generated by the FTP daemon
interactive-commandsAny command executed at the CLI
kernel Any message originating from the JUNOS kernel
pfe Any messages that the PFE generates
user Any message generated by a user process
Once a message class is determined, it is combined with a severity level to pinpoint the exact type of information to be stored in the
syslog files. Severity levels and their descriptions are shown in the command completion example below:
[edit system syslog]
lab@Chicago# set console any ?
Possible completions:
alert Conditions that should be corrected immediately
any Matches any level
critical Critical conditions
emergency Panic conditions
www.ebook-converter.com
error Error conditions
info Informational messages
notice Conditions that should be handled specially
warning Warning messages
Table 5-4 offers a more concise definition of the severity levels supported in descending order from most to least severe.
Using combinations of class and severity level, it is possible to gather the exact data sought by the system administrator. The syntax for
building a syslog archive using variations of these settings is shown in the next example, which uses a frequently employed combination
of class and severity level to track users who log into the system and attempt to configure the router. This is done by specifying class
interactive-commands and severity-level information.
Table 5-4. Severity Levels for System Logging
Severity LevelDescription
emergency Router is in a panic state or for some other reason has become unusable. This is the highest severity level.
alert Router is experiencing conditions that should be corrected immediately. An example would be a corrupted database.
critical Failure or errors on one of the system drives.
error Any standard error message.
warning Any standard system warning message.
174
5. Router Access and System Administration
[edit system syslog]
lab@Chicago# set file bigbrother archive files 5 size 5m no-world-readable
[edit]
lab@Tokyo# commit
commit complete
[edit]
www.ebook-converter.com
lab@Chicago#
The domain name in which the router is logically positioned can be defined on the router and, if configured, the domain name will be
appended to host names in some domain-name lookup situations. To configure the domain name, use the set domain-name
command as has been done in the sample below. For the sake of clarity only the output pertinent to the configuration tasks in this
section of the chapter are included in the example below.
[edit system]
lab@Chicago# set domain-name TPIndustries.net
[edit system]
lab@Chicago# show
host-name Chicago;
domain-name TPIndustries.net;
Setting Location
It is sometimes convenient to be able to learn the physical location of a router by reading its configuration, especially in remote access
situations. The options listed below allow a high degree of precision when defining the location of the device:
[edit system]
Note
The output from the CLI above mentions Bellcore several times. Bellcore is short for Bell Communications Research.
Among the many things, they have divided the world up into zones based on the magnitude of earthquakes possible in any
given area. Those areas with the potential for the strongest earthquakes, 7.1–8.3 on the Richter scale, are given a Bellcore
Zone rating of 4. Areas that are not subject to earthquakes, south Florida for example, are given a Bellcore Zone rating of 0.
[edit system]
www.ebook-converter.com
lab@Chicago# show
host-name Chicago;
domain-name TPIndustries.net;
time-zone America/Guyana;
location country-code DK;
It will more than likely be necessary to use the set time-zone ? command to view the list of valid continent and city combinations.
The list is rather lengthy. A small portion of it is shown next:
[edit system]
lab@Chicago# set time-zone ?
Possible completions:
Africa/Abidjan Time zone for Africa/Abidjan
Africa/Accra Time zone for Africa/Accra
Africa/Addis_Ababa Time zone for Africa/Addis_Ababa
Africa/Algiers Time zone for Africa/Algiers
Africa/Asmera Time zone for Africa/Asmera
Africa/Bamako Time zone for southwest Mali
Africa/Bangui Time zone for Africa/Bangui
Africa/Banjul Time zone for Africa/Banjul
FormatDescription Example
YYYY Current year in a four-character numeric format 2003
MM Current month in a two-character numeric format 01
DD Current day in a two-character numeric format 09
HH Current hour using a 24-hour clock. 19
MM Current minute using a two-character numeric format 45
SS Current second using a two-character numeric format15
The configuration sample below demonstrates the syntax of the command as it is typed in the operational mode. In this example, the
date and time have been set to reflect 15 seconds past 7:45 P.M., January 9, 2003.
lab@Chicago> set date 200301091945.15
Thu Jan 9 19:45:15 UTC 2003
www.ebook-converter.com
Last configured: 2002-04-01 02:27:32 UTC (40w3d 17:18 ago) by lab
7:45PM up 5 days, 11:25, 1 user, load averages: 0.00, 0.00, 0.00
www.ebook-converter.com
lab@Chicago# set server 192.168.10.5
Note
NTP adjustments are only made in situations where the router's internal clock is set to more than 128 ms or less than 128
seconds different from the NTP master clock. If the router's internal time is less than 128 ms different, the time is slowly
stepped into sequence with the NTP clock. If the time is more than 128 seconds different from the master, then it is necessary
to use the set date command to bring the time to within 128 seconds of the NTP clock before synchronization will take
place.
[edit system]
lab@Chicago# show
name-server {
192.168.50.50;
}
Chapter Summary
This chapter gives the reader an overview of the administrative responsibilities of a network engineer and how those responsibilities are
carried out on a Juniper Networks router. We first looked at the methods with which we would make a physical connection to the
router, including the console, auxiliary, and management Ethernet ports. We looked in detail at the structure of the commands needed
www.ebook-converter.com
to configure the management Ethernet connection. We then looked at methods of authenticating the identity and defining the
permissions and restrictions of system users. We also discussed ways of configuring the router to rely on network authentication
methods, including RADIUS and TACACS+. In Section 5.2.7 we learned how to enable FTP, Telnet, and SSH. We also learned some of
the commands to use at the prompts encountered when using these services. We covered the steps that can be taken to recover a lost
password. Finally, we looked at some of the other jobs that, although secondary, are still important to the configuration of the router.
These included setting a host name, adjusting system time and date, configuring NTP, and specifying DNS servers for host-name
resolution.
Bibliography
Case Study: A Typical Base Configuration
Now that we have discussed the individual statements that go into setting up users, enabling services, and enabling remote access to the
router we will look at a typical configuration example. The following statements are representative of a typical base configuration. The
elements included in this base would be found on almost any Juniper Networks M-Series router, be it located in a production network or
a lab environment.
No production network interfaces have been configured and no IGP has been put in place.
A user, lab, has been added and given the ability to execute all commands as needed. Another user, guest, has been added and given
[edit]
lab@Chicago# show
version 5.0R1.4;
system {
host-name Chicago;
location {
country-code us
login {
user lab {
uid 2000;
class power-user;
authentication {
encrypted-password “$1$f4uMb$l.We41nx6.M8CfrFl.Wf81”; #
SECRET-DATA
}
}
user guest {
uid 2001;
class operator;
authentication {
encrypted-password “$1$f4uMb$l.WM8CfrFl.Wf81”; # SECRET-DATA
www.ebook-converter.com
}
}
ntp {
boot-server 192.168.151.5;
server 192.168.10.5;
}
ports {
auxiliary {
insecure;
speed 9600;
type vt100;
}
}
services {
ssh;
}
syslog {
file bigbrother {
interactive-commands info;
archive {
180
5. Router Access and System Administration
interfaces {
fxp0 {
speed 100m;
link-mode full-duplex;
unit 0 {
family inet {
address 192.168.161.23/24;
}
}
}
}
[edit]
lab@Chicago#
www.ebook-converter.com
www.ebook-converter.com
SNMP Overview
You may already know that before the Internet became the public, global entity that it is today, it was known as
ARPANET. Of course, it was much smaller then, but did you know that they used ping to manage the network?
www.ebook-converter.com
Essentially, network operators found system problems if a ping failed or if the phone rang!
This method, while functional at the time, did not scale well as the ARPANET evolved into the Internet. Thus,
another solution was needed. SGMP was the first solution after ping, and it quickly evolved into SNMP. The
goal was, and still is, to have a protocol that allows you to monitor and manage a network dynamically. SNMP is
a network management tool that enables you to do this. Interestingly enough, some networks still use ping today
as a method to manage the network and conduct performance monitoring.
SNMP is the most commonly used protocol in the arena of network management. Originally developed in 1988,
SNMP has evolved into a robust protocol dedicated to managing various network devices and is the de facto
standard for network management. As networks grow and evolve and their complexity increases, the ability to
determine the operational parameters and functionality of the network devices is crucial. SNMP is extensible
and easy to implement (i.e., little code is needed), which allows manufacturers to easily implement SNMP in
their products. SNMP also allows manufacturers to have an architecture dedicated to network management and,
thus, separate from the device's ability to perform the desired network function.
SNMP is an OSI application-layer protocol that provides for the exchange of information between SNMP-
Evolution of SNMP
SNMP evolved from RFC 1028 SGMP; version 1 is currently documented in RFC 1157. As acceptance of
SNMP grew, the Internet Engineering Task Force (IETF) began work on a new version of SNMP. Owing,
however, to strong opinions and a failure to compromise, SNMPv2 was never ratified. Two opposing groups
emerged, and to date, nothing has ever been formally completed. Recently—in IETF time—a new working
group was formed to develop SNMPv3. We can only hope they have learned from the past and that the
SNMPv3 standards will be ratified. In spite of the formal failure to adopt v2, it is still widely used for a variety of
purposes. It is currently implemented in both the Cisco Internetworking Operating System (IOS) and JUNOS,
owing to support for larger counters. SNMPv3 is considered superior, in large part due to its enhanced security
support.
Table 6-1 lists network-management-based RFCs and shows how SNMP has evolved to meet the needs of
today's complex internetworks.
Table 6-1. SNMP RFC Evolution
www.ebook-converter.com
SNMP Functional AreaRFC Status
SGMP
SNMPv1
Historic
Standard
Applicable RFCs
1028
1067 -> 1098 -> 1157
SNMPv2, SNMPv2p Historic 1441, 1445 -> 1449, 1452 -> 1901, 1905-1906, 1908
SNMPv2u Experimental 1909, 1910
SNMPv2 Proposed draft (expired)Not assigned a number
SNMPv2c Experimental 1901
SNMPv3 Draft standard 2261, 2265, 2271, 2275, 2571 -> 2575
MIB-I Standard 1066 -> 1156
MIB-II Proposed standard 2011, 1158 -> 1213, 2012, 2013
Interfaces group Proposed standard 1229 -> 1573 -> 2233
SMIv1 Standard 1065 -> 1155, 1212
SMIv2 Standard 1442 -> 1444, 1902 -> 1904, 2578, 2580
Get-bulk Experimental 1187
RMON Draft standard 1271 -> 1757
Downloader demo watermarks
RMONv2
SMON
Proposed standard
Proposed standard
2021
2613
184
6. Router Management, Firewall Filters, and Accounting
SNMP is part of an Internet network-management architecture based on the interactions of several separate
entities: agents, network-management stations, management information bases, and abstract syntax notation
(ASN). ASN is the method in which SNMP is written to create an SNMP MIB. These entities are described in
the following sections.
Agents
SNMP achieves the goal of managing network devices by sending messages known as protocol data units
(PDUs) to SNMP-enabled devices. These devices have compliant code within them that uses SNMP. When a
device becomes SNMP-enabled it is referred to as an agent. An SNMP agent will store data about the device, its
configuration, and its operation in a specialized database used by SNMP and known as an MIB. Agents can be
placed in almost any device. Figure 6-1 shows some of the devices agents can be in. It will not be long before
even our refrigerators are SNMP accessible as the technology we deal with is implemented in more aspects of
our everyday life. In Figure 6-1 you can see that the network-management station uses SNMP across the
network to access the SNMP agent in a network device to retrieve data. This data could be as simple as who
manufactured the device or as complex as the amount of data sent through an interface.
www.ebook-converter.com
Figure 6-1. SNMP Agents in Network Devices
In this figure the SNMP protocol is rather generic in its representation. In reality, SNMP has a variety of actions
that it can perform as a protocol. For example, SNMP can get a specific bit of information or get a bulk of
information. Perhaps the most common is where the SNMP agent tells the management station an event has
occurred (e.g., link down) via a special SNMP message known as a trap.
Network-Management Systems
Network management is done from network-management systems (NMSs), which are general-purpose
computers running special management software. The specialized management software usually employs a
version of SNMP so that the management station can communicate with the SNMP agents throughout the
network. You may have heard of the more popular NMSs, such as HP OpenView or Tivoli, but there are many
MIB
As mentioned earlier, the MIB is a database that holds a variety of information about the SNMP-enabled device.
The SNMP agent stores this information in a database that resembles a tree. This structure can be seen in Figure
www.ebook-converter.com
6-3. Notice in this figure the numbers in parentheses; these numbers provide a map to the information stored by
the MIB. When these numbers are placed together in a string, they are known as an object identifier (OID); we
will look at an OID in more detail shortly.
www.ebook-converter.com
Figure 6-4. IP Group in the MIB Tree
The ICMP group is about ICMP-related messages and statistics. Basically, it has a counter for each ICMP
message and records how many of that type have been seen. For example, it tracks how many times the
device was pinged and how many times the device replied to a ping, as well as the number ICMP error
messages.
The TCP group monitors the current and cumulative number of connections opened, segments sent and
received, and various error statistics. You could, for instance, monitor who was telnetted into your device
through this group because Telnet is TCP.
The UDP group logs the number of UDP datagrams sent and received and how many of the latter were
187
6. Router Management, Firewall Filters, and Accounting
Note
The EGP MIB is deprecated since no one uses EGP anymore.
Additional groups can be added as you add more MIBs. OSPF, for example, has its own RFC that details the
OSPF MIBs, and if you load them into your SNMP browser, you can access the OSPF data that SNMP stores on
a router. You can retrieve OSPF information, like the whole OSPF link state database (LSDB). In this chapter
we used an MIB browser program to access the SNMP data on routers. This browser came from MG-SOFT
(www.mg-soft.com) and is a very robust tool that you should evaluate.
www.ebook-converter.com
.2 = mgmt
.1 = MIB-2
.2 = interfaces
.2 = IfTable
.1 = ifEntry
.3 = If Type
The process of retrieving this MIB data is known as walking the MIB in the vernacular of SNMP. This walking is
actually using the SNMP get command to get the data from the SNMP device.
www.ebook-converter.com
configure and enable SNMP on a Juniper Networks router. The following are the default conditions for SNMP
defined by Juniper Networks that will guide the configuration process:
SNMP is disabled.
When SNMP is enabled, it is activated on all router interfaces.
SNMPv1 and v2 are supported, and both are automatically activated, unless a version is specified.
Read-write SNMP communities are not really writeable.
The only time you can use an SNMP set command is through the use of the proxy ping set command
(JUNOS 5.0 and later).
Juniper Networks implementation of SNMP traps will transmit multiple traps (i.e., one for each version) if
the version to use it is not specified.
189
6. Router Management, Firewall Filters, and Accounting
[edit SNMP]
snmp {
description description;
location location;
contact contact;
interface [ interface-name ];
community community-name {
authorization authorization;
clients {
default restrict;
address <restrict>;
}
view view-name;
}
trap-group group-name {
categories category;
targets {
address;
}
version version;
}
view view-name {
oid object-identifier (include | exclude);
}
traceoptions {
file <files number> <size size>;
flag flag <disable>;
www.ebook-converter.com
}
}
It is beyond the scope of this chapter to discuss all these parameters, but we will look at enough of these options
for you to get SNMP operating on a complex internetwork. If additional information is needed, refer to the
appropriate RFC or the resources recommended in the bibliography, such as the Juniper Networks
documentation.
[edit snmp]
user@Chicago# set community 800frIP authorization read-write
The completed initial SNMP configuration looks as follows:
[edit snmp]
www.ebook-converter.com
user@Chicago# show
description "JUNIPER NETWORKS ROUTER";
location "CHICAGO, NC";
contact "TOM THOMAS";
community public {
authorization read-only;
}
community 800frIP {
authorization read-write;
}
Now that the initial SNMP configuration has been completed, you need to test access and operation. Once you
configure the MIB browser with the proper password, you can access the router. Refer to Figure 6-6, where an
SNMP query was sent to the router at 192.168.254.70 to retrieve the system description at the OID
1.3.6.1.2.1.1.1.0.
www.ebook-converter.com
Configuring SNMP Trap Groups
SNMP traps are the notifications used by SNMP to alert you to a problem or change in status within a device.
Trap groups in SNMP are excellent tools that allow the distribution of certain specified traps to the devices that
you indicate. The trap-group name field will be transmitted within every trap sent as identified in that trap
group. When configuring a trap group, make sure that you specify a target, otherwise it will not be very
effective. A possible configuration is shown below:
[edit snmp]
user@Chicago# show
description "JUNIPER NETWORKS ROUTER";
location "CHICAGO, NC";
contact "Tom Thomas";
community public {
authorization read-only;
Note
An SNMP trap group target is usually the IP Address of the SNMP server.
In addition to defining the target of a trap group, you can also specify which SNMP version of traps will be
transmitted. By default, Juniper Networks routers will transmit all versions; thus, you may end up receiving
multiple traps if you do not specify a version.
The NMS is configured to receive the link traps via the ALERT trap group. Link traps consist of reporting the
up-down status of router interfaces. In Figure 6-7, the NMS receives two traps: The first trap is a link-down
notification and tells who (router 192.168.254.70), what (link-down notification), where (interface fxp2),
and when (10/27/01—11:19). The second trap notifies us that the interface is back up.
www.ebook-converter.com
193
6. Router Management, Firewall Filters, and Accounting
That a Juniper Networks router only supports read-only access does not mean you should allow just anyone to
retrieve SNMP data from your router. You may want to reduce or limit the OIDs that a certain NMS or netblock
has the ability to read on your routers. Say you only want to let customers read interface counters on the
interfaces they are connected to, thus allowing them to see the performance of their connection. In this case, you
would create an MIB VIEW associated with an SNMP community.
The following example creates a community called CUSTOMER and an MIB VIEW called CUSTOMER. When
you assign that MIB VIEW to the community as shown in the configuration output below, you restrict access to
the interface OIDs from the SNMP tree.
[edit snmp]
user@Chicago# show
description "JUNIPER NETWORKS ROUTER";
location "CHICAGO, NC";
contact "TOM THOMAS";
view CUSTOMER {
oid .1.3.6.1.2.1.2;
}
community public {
authorization read-only;
}
community 800frIP {
authorization read-write;
}
community CUSTOMER {
view CUSTOMER;
authorization read-only;
www.ebook-converter.com
}
trap-group ALERTS {
version v2;
categories link;
targets {
192.168.254.7;
}
}
[edit snmp]
It is important to note that the OID is inherited in Juniper Networks routers. Thus, the OID used here
(.1.3.6.1.2.1.2) is that for the interface group; all more specific OIDs beneath it are considered within it.
In Figure 6-8, the interface group is selected and its OID used in the configuration example. Notice that all the
interface characteristics and more specific entries beneath the interface group are accessible by default. Caution
is required when determining which OIDs are accessible. For example, it may not be appropriate to allow a
customer access to the MIBs, which contain all the routing data for your network.
Trace Options
To trace SNMP traffic, you specify trace options by including the traceoptions statement at the [edit
snmp] hierarchy level. As the following example shows, you can set the filename and size, among other things:
[edit snmp]
user@Chicago# set traceoptions filename files 10 size 500
user@Chicago# set flag ?
Possible completions:
all Trace everything
general Trace general events
interface-stats Trace interface statistics (logical and physical)
pdu Dump SNMP request/response packets
protocol-timeouts Trace SNMP request timeouts
routing-socket Trace routing socket calls
subagent Trace Sub-agent restarts
timer Trace internal timer events
varbind-error Trace varbind errors
[edit snmp traceoptions]
user@Chicago# set flag all
Using the all option would result in a configuration for SNMP that has tracing enabled as follows:
www.ebook-converter.com
[edit snmp]
user@Chicago# show
description "JUNIPER NETWORKS ROUTER";
location "CHICAGO, NC";
contact "TOM THOMAS";
view CUSTOMER {
oid .1.3.6.1.2.1.2;
}
community public {
authorization read-only;
}
community 800frIP {
authorization read-write;
}
community CUSTOMER {
view CUSTOMER;
authorization read-only;
196
6. Router Management, Firewall Filters, and Accounting
The output of the tracing operations is placed into the following three files, all of which are located in the
/var/log directory, which is accessible via the shell:
snmpd—. contains errors and communications between the server and subagents
mib2d—. contains all interface statistics
rmopd—. contains all ping MIB statistics
If you are interested in learning additional information on the trace options functionality and features, refer to
Section 15.6.
SNMP Statistics
You can see the operation and function of SNMP via the following commands:
show snmp statistics
clear snmp statistics
This next example of the show command demonstrates the various parameters and statistics that you can
recover from the statistics command:
user@Chicago> show snmp statistics
SNMP statistics:
Input:
Packets: 0, Bad versions: 0, Bad community names: 0,
www.ebook-converter.com
Bad community uses: 0, ASN parse errors: 0,
Too bigs: 0, No such names: 0, Bad values: 0,
Read onlys: 0, General errors: 0,
Total request varbinds: 0, Total set varbinds: 0,
Get requests: 0, Get nexts: 0, Set requests: 0,
Get responses: 0, Traps: 0,
Silent drops: 0, Proxy drops 0
Output:
Packets: 9, Too bigs: 0, No such names: 0,
Bad values: 0, General errors: 0,
Get requests: 0, Get nexts: 0, Set requests: 0,
Get responses: 0, Traps: 9
The clear SNMP command resets all the values displayed back to zero. This is useful when troubleshooting or
monitoring the operation of SNMP by resetting the values to zero.
Note
www.ebook-converter.com
Remember the caveat that JUNOS only allows for IP-based filters!
Filtering in a Juniper Networks router implies that upon the matching of criteria within a packet, an action can
then be taken. However, firewall filtering has some dependencies based on the hardware that you have deployed
in your network:
All routers can filter the packets sent to or by the routing engine.
Routers equipped with an Internet Processor II allow stronger filtering by allowing you to filter packets
forwarded by the router.
Firewall filters allow for the controlling of packets destined to and from the routing engine. There is no measured
limit to the length and depth of the filters possible. However, common sense applies here; the more terms and
conditions you apply with a filter, the longer it will take to process each IP packet against it. In practice, Juniper
Networks reports filters in use with over 1,000 terms and conditions.
198
6. Router Management, Firewall Filters, and Accounting
packet filtering conditions are collectively known as statements within an ACL. In JUNOS, we use firewall filters
that are built using terms. These terms, or statements, have conditions within them. As with other vendors'
products, the order of the terms affects the processing of the filter. When a match is found, the packet is
immediately processed without further processing of the filter. As expected, if no match is found, the packet is
discarded (implicit deny all).
There are two types of conditions that are possible in JUNOS firewall filters: match and action. A match
condition allows you to specify the conditions that a packet will be judged against. The possible parameters
available for matching are as follows:
Source address
Destination address
TCP or UDP port
Protocol
ICMP packet type
IP options
TCP flags
Incoming/outgoing interface
The action condition within a term specifies what the router is to do with the packet if it matches one of the
match conditions defined above. The possible actions are as follows:
www.ebook-converter.com
Accept the packet
Reject the packet
Take no action
With firewall filters, packets can be statistically sampled, counted, or logged to provide data on traffic within
your network, the effectiveness of your filter, or proof of possible attacks. Firewall filters can be applied to
either a physical or a logical interface. Through the use of filters, you can implement rate limiting to prevent your
router or network from being overwhelmed by certain types of packets. This can protect you from certain types
of DoS attacks.
www.ebook-converter.com
Configuration Guidelines
When configuring a firewall-filter layout, you should plan the terms and their associated match conditions before
configuring the router to verify the logic. A good configuration rule of thumb is that you would want to place
your most specific terms first to ensure that the processing (top-down) makes the filter function as you desire.
There are a series of configuration steps that you must follow to activate and apply a filter properly.
You need to configure the firewall in the [edit firewall] configuration hierarchy level and apply the filter
to an interface for the filter to be considered active. When you create a firewall filter, the syntax needed is as
follows:
[edit firewall]
filter filter-name {
term term-name {
from {
action;
action-modifiers;
term implicit-rule {
200
6. Router Management, Firewall Filters, and Accounting
then discard;
}
}
}
The steps for configuring a firewall filter correspond to the syntax the router expects to see. The filter in this
example stops IP packets sourced from martian routes from reaching the routing engine. In the many networks,
there is no reason for packets sourced from these martian networks to be transmitted. Of course, you can easily
apply a filter like this to prevent access to the routing engine from a network that is attacking your router. To
configure the firewall filter, you need to do the following:
1. Name your filter
2. Name each term in the filter
3. Determine the match conditions
4. Assign the action statement
5. Apply firewall filters to interfaces
The following sections describe how to use these steps to create a firewall filter.
www.ebook-converter.com
set filter RE-SECURE
We always recommend that you name your filter something that bears a relation to the filter's purpose. In the
above example, RE-SECURE is a filter to secure access to the routing engine. The filter and term names can
contain letters, numbers, and hyphens, and they can be up to 24 characters long. To include spaces in the name,
enclose the entire name in quotation marks.
201
6. Router Management, Firewall Filters, and Accounting
Note
Firewall-filter terms are evaluated in the order in which you specify them in the configuration. To
reorder terms, use the configuration-mode insert command. For example, the command insert
term up before term start places the term up before the term start. This is definitely a very
useful feature.
www.ebook-converter.com
223.255.255.0/24;
240.0.0.0/4;
We mentioned earlier that the capabilities of firewall filters are rather extensive. The following configuration
output shows the long list of possible match conditions:
user@Chicago# set filter RE-SECURE term BLOCK-MARTIANS from ?
Possible completions:
> address Match IP source or destination address
+ apply-groups Groups from which to inherit configuration data
> destination-address Match IP destination address
+ destination-port Match TCP/UDP destination port
+ destination-port-except Don't match TCP/UDP destination port
> destination-prefix-list Match IP destination prefix-list
+ dscp Match diffserv codepoint
+ dscp-except Don't match diffserv codepoint
first-fragment Match if packet is the first fragment
Downloader demo watermarks
fragment-flags
+ fragment-offset
Match fragment flags
Match fragment offset
+ fragment-offset-except Don't match fragment offset
+ icmp-code Match ICMP message code
+ icmp-code-except Don't match ICMP message code
+ icmp-type Match ICMP message type
202
6. Router Management, Firewall Filters, and Accounting
+ icmp-type-except Don't match ICMP message type
+ interface-group Match interface group
+ interface-group-except Don't match interface group
ip-options Match IP options
is-fragment Match if packet is a fragment
+ packet-length Match packet length
+ packet-length-except Don't match packet length
+ port Match TCP/UDP source or destination port
+ port-except Don't match TCP/UDP source or destination port
+ precedence Match IP precedence value
+ precedence-except Don't match IP precedence value
> prefix-list Match IP source or destination prefix-list
+ protocol Match IP protocol type
+ protocol-except Don't match IP protocol type
> source-address Match IP source address
+ source-port Match TCP/UDP source port
+ source-port-except Don't match TCP/UDP source port
> source-prefix-list Match IP source prefix-list
tcp-established Match packet of an established TCP connection
tcp-flags Match TCP flags
tcp-initial Match initial packet of a TCP connection
We should note that in the example we are using for this configuration explanation, there is but one single from
statement with lots of associated addresses. When the syntax is presented in this manner, any packet with any of
the listed source addresses indicated will be considered a match.
You can also use multiple from conditions. Notice the from protocol tcp statement in the following
www.ebook-converter.com
configuration:
[edit firewall]
user@Chicago# show
filter RE-SECURE {
term BLOCK-MARTIANS {
from {
source-address {
127.0.0.0/8;
128.0.0.0/16;
191.255.0.0/16;
192.0.0.0/24;
223.255.255.0/24;
240.0.0.0/4;
}
protocol tcp;
}
This statement has the effect of introducing a second match condition. Logically, packets will now have to have
one of the source addresses as shown and be TCP-based packets. The order in which you specify the match
conditions is not important because the term must match all conditions in order for a match to occur.
203
6. Router Management, Firewall Filters, and Accounting
Assigning the Action Statement
At this point, we have all the names of our filter and terms in place, and we know what kind of packets we are
looking to match. The next logical step is to tell the router what to do with the packets once they are matched
through the use of a then statement as follows:
[edit firewall filter RE-SECURE term BLOCK-MARTIANS]
user@Chicago# show
from {
source-address {
127.0.0.0/8;
128.0.0.0/16;
191.255.0.0/16;
192.0.0.0/24;
223.255.255.0/24;
240.0.0.0/4;
}
}
then {
log;
syslog;
reject administratively-prohibited;
}
In the case of a match, the router will this time log the match to a log file on the hard drive, send a syslog
message, and transmit back an administratively prohibited message. Of course, whether that
message has any impact on the sender is open to debate, but it will be sent because the RFC says it must.
www.ebook-converter.com
The following CLI example shows the then actions possible with a firewall filter:
user@Chicago# set then ?
Possible completions:
accept Accept the packet and transmit
count Count the packet in the named counter
discard Discard the packet
log Log the packet
output-queue Set output queue for packet (0..3)
plp Mark the packet (0..1)
policer Police the packet using the named policer
> reject Reject the packet and send reject message
routing-instance Provide routing instance
sample Sample the packet
syslog Syslog information about the packet
www.ebook-converter.com
In our sample, we are creating a filter to stop martian routes from being allowed to access the routing engine.
When using a Juniper Networks router you can restrict access to the routing engine by applying a filter to the
loopback interface. When applying our sample filter, RE-SECURE, to the loopback interface, we will choose a
direction as shown below:
[edit interfaces lo0]
user@Chicago# set unit 0 family inet filter input RE-SECURE
The completed interface and firewall filter configuration will appear in the router as follows:
}
}
lo0 {
description "ROUTING ENGINE IS ACCESSIBLE VIA THIS INTERFACE";
unit 0 {
family inet {
}
input RE-SECURE;
}
}
}
205
6. Router Management, Firewall Filters, and Accounting
}
}
firewall {
filter RE-SECURE {
term BLOCK-MARTIANS {
from {
source-address {
127.0.0.0/8;
128.0.0.0/16;
191.255.0.0/16;
192.0.0.0/24;
223.255.255.0/24;
240.0.0.0/4;
}
}
then {
log;
syslog;
reject administratively-prohibited;
}
}
term PERMIT-OTHERS {
from {
source-address {
0.0.0.0/0;
}
}
www.ebook-converter.com
then accept;
}
}
}
user@Chicago>
Remember that we can use the same filter multiple times and that the Internet Processor II from Juniper
Networks is required. Thus, if we had wanted to, we could have applied this same filter to every interface on the
router, thereby ensuring that our router never accepted invalid martian routes. The logic that we discussed in this
chapter forms the foundation for route filtering (route maps) and other ways to manipulate packets that we will
be discussing in later chapters.
206
6. Router Management, Firewall Filters, and Accounting
TCP flags
ICMP (code or type)
Port number (source or destination)
Protocol (TCP or UDP)
The primary technology in use is of course TCP/IP in a Juniper Networks router. In Figure 6-10 the highlighted
fields are available to be looked at by a filter.
www.ebook-converter.com
To implement filtering based on the packet-header values, you will need to use a variety of keywords that have
been preprogrammed for you and represent the appropriate bit within the packet. These keywords always map to
a single bit value and can be used to match in either decimal or hexadecimal (if you really want to bake your
brain!). Fortunately though, there are a variety of keywords that represent common bit-field values to make filter
creation much easier (tcp-established is one such keyword).
We will discuss some of the mathematical and textual keywords in the following section, but let's first discuss
some guidelines to follow when using these terms.
www.ebook-converter.com
Table 6-2. Firewall-Filter Match Conditions
Match
Condition
(with
variables) Description
fragment- IP fragmentation flags are warranted when packets are fragmented and are identified by a
flags numeric value or name as shown below. In place of the numeric field value, you can specify one
number of the following keywords (the IP-header field values are also listed):
-dont-fragment (0x4000)
-more-fragments (0x2000)
-reserved (0x8000)
ip-options In place of the numeric value, you can specify one of the following text synonyms (the field
Downloader demo watermarks
number values are also listed):
-loose-source-route (131)
-record-route (7)
208
6. Router Management, Firewall Filters, and Accounting
Match -router-alert (148)
Condition
(with -strict-source-route (137)
variables) Description
-timestamp (68)
tcp-flags Normally, you specify this match in conjunction with the protocol match statement to determine
number which protocol is being used on the port. In place of the numeric value, you can specify one of
the following text synonyms (the field values are also listed):
-ack (0x10)
-fin (0x01)
-push (0x08)
-rst (0x04)
-syn (0x02)
-urgent (0x20)
first- The first fragment of a fragmented packet is indicated in this match condition. When a packet is
fragment fragmented, there has to be a first one, and this is how the router detects the first. This condition
does not match unfragmented packets.
is-fragmentThis condition matches if the packet is a fragment and is usually applied in conjunction with the
first-fragment option, thereby allowing the router to filter all of the fragments of a packet and
make an action accordingly.
tcp- This condition matches TCP packets other than the first packet of a connection. This is a
www.ebook-converter.com
established synonym for (ack | rst) and is indicative of a TCP connection that has successfully
completed the three-way handshake. This condition does not implicitly check that the protocol
is TCP. To check this, specify the protocol tcp match condition. Traditionally, this match
condition is used to filter out traffic that did originate from inside a network.
tcp-initialThis condition matches the first TCP packet of a connection. This is a synonym for (syn &
!ack). This condition is used to prevent the initiation of a DoS attack; for example, attackers
may try to open many TCP connections with a host with a bogus source address, causing the
host to wait. This condition does not implicitly check that the protocol is TCP. To check this,
specify the protocol tcp match condition.
Like with regular expressions, the more detailed filters have several logical operators that can be used to
combine the filter match conditions. These operators allow you to group conditions and set a precedence of
order as Table 6-3 shows. The precedence is from the top of the table down and follows traditional mathematical
rules (i.e., the items in parenthesis are performed first, and then left to right).
Table 6-3. Firewall-Filter Logical Operators
A match occurs if the packet is not the initial packet on a TCP session:
tcp-flags "!syn | ack";
www.ebook-converter.com
[edit firewall filter VIRTUAL-ACCESS-CONTROL]
user@Chicago# show
term DENY-ACCESS {
from {
destination-address {
10.0.0.0/8;
}
protocol tcp;
port [ telnet ssh ];
}
then
log;
discard;
}
term PERMIT-ACCESS {
from {
address {
Downloader demo watermarks
}
}
0.0.0.0/0;
then accept;
}
210
6. Router Management, Firewall Filters, and Accounting
[edit firewall filter VIRTUAL-ACCESS-CONTROL]
user@Chicago#
Now, keep in mind that those familiar with Cisco terminology might find the term DENY-ACCESS from
destination-address 10.0.0.0/8 a bit confusing because of the presence of the word from. Notice, however,
that we clarify that by choosing the destination-address keyword. Also, do not forget to apply the filter
to an interface.
www.ebook-converter.com
}
www.ebook-converter.com
The best thing to do is create and use prefix lists when configuring policing or rate limiting as this gives you the
added flexibility of just adding a customer's network prefix under the appropriate list. This, in turn, maps to a
policing statement where the actual rate limiting occurs. For this example, we enter into the [edit policy-
options] hierarchy level of the JUNOS configuration mode and create a prefix list for each of the five
categories defined previosly. Then it's a matter of applying the prefixes to each.
[edit policy-options]
user@Chicago# set prefix-list PLATINUM-CUSTOMERS
[edit policy-options prefix-list PLATINUM-CUSTOMERS]
user@Chicago# set 50.50.50.0/24
You can repeat these steps until you have created an entry for each classification and assigned a prefix. Of
course, in this configuration example, the prefixes correspond to the categories' traffic rates. When the
configuration is complete, it should look as follows:
[edit policy-options]
Downloader demo watermarks
user@Chicago# show
prefix-list PLATINUM-CUSTOMERS {
50.50.50.0/24;
}
prefix-list GOLD-CUSTOMERS {
212
6. Router Management, Firewall Filters, and Accounting
40.40.40.0/24;
}
prefix-list SILVER-CUSTOMERS {
30.30.30.0/24;
}
prefix-list BRONZE-CUSTOMERS {
20.20.20.0/24;
}
prefix-list COPPER-CUSTOMERS {
10.10.10.0/24;
}
[edit policy-options]
user@Chicago#
Having completed the configuration of the prefix lists, the next step is to enter into the firewall configuration
hierarchy to begin building the firewall-filter statements. These statements are where the actual rate limiting is
configured. The JUNOS syntax here has us define a filter name, then name a policer, then give the actions to
take if the bandwidth is exceeded. The steps are not accomplished in quite the order that you would expect, but
we shall review the process:
1. Define the firewall filter.
2. Enter into the firewall configuration hierarchy and name the filter.
3. Define policer, transmission limits, and action.
www.ebook-converter.com
4. Name the policer so it can be referenced later; set the action (in this case, we want an action “if exceeded”);
then set the bandwidth and burst limit, as well the action to be taken (e.g., discard).
5. Configure the term statement to classify the source.
6. Create and name a term statement; assign the customer information to identify who should be subject to
the filter (in this example, we use the preceding prefix lists).
7. Assign a named policer to the term.
8. Assign the policer to the term as a then statement, thereby applying the limits and action to the identified
customer.
The following is the complete configuration using the prefix lists to identify the customer network(s) and
following the above configuration steps and explanations.
firewall {
filter PLATINUM-LIMIT {
Downloader demo watermarks
policer PLATINUM-CIR {
if-exceeding {
bandwidth-limit 50m;
burst-size-limit 25m;
}
213
6. Router Management, Firewall Filters, and Accounting
then discard;
}
term ID-PLATINUM-CUSTOMERS {
from {
source-prefix-list {
PLATINUM;
}
}
then policer PLATINUM-CIR;
}
}
filter GOLD-LIMIT {
policer GOLD-CIR {
if-exceeding {
bandwidth-limit 40m;
burst-size-limit 20m;
}
then discard;
}
term ID-GOLD-CUSTOMERS {
from {
source-prefix-list {
GOLD;
}
}
then policer GOLD-CIR;
}
www.ebook-converter.com
}
filter SILVER-LIMIT {
policer SILVER-CIR {
if-exceeding {
bandwidth-limit 30m;
burst-size-limit 15m;
}
then discard;
}
term ID-SILVER-CUSTOMERS {
from {
source-prefix-list {
SILVER;
}
}
then policer SILVER-CIR;
}
www.ebook-converter.com
}
}
}
215
6. Router Management, Firewall Filters, and Accounting
Configuring Interface-Specific Counters
The configuration of interface counters allows for the tracking of packet matches from the firewall filter. Filters
can be used on multiple interfaces if desired, and when configuring counters, this fact must be clear as counters
are activated on a per-interface basis. To configure counters, you do not activate them in interface-configuration
mode, but rather within the firewall-configuration hierarchy, where you activate counting in the then section of
the filter, as shown in the following code. Counting enables you to count (sometimes known as log) the number
of times a filter is matched.
}
firewall {
filter FE-SECURE {
interface-specific;
term BLOCK-MARTIANS {
from {
source-address {
127.0.0.0/8;
128.0.0.0/16;
191.255.0.0/16;
192.0.0.0/24;
223.255.255.0/24;
240.0.0.0/4;
}
}
then {
count MARTIAN01;
log;
www.ebook-converter.com
}
syslog;
reject administratively-prohibited;
}
term PERMIT-OTHERS {
from {
source-address {
0.0.0.0/0;
}
}
then accept;
}
}
}
Once your filter is actively counting packets for you and has been applied to an interface, you are able to view
the packet counts. There is a catch when trying to view the counters found on the router. Juniper Networks
Downloader demo watermarks
routers append some data to the end of the log commands; the information will be the interface designation with
a dash and a letter. You can view the filename by using the show firewall log command to determine
what the actual filename is!
user@Chicago> show firewall log
Time Filter A Interface Pro Source address Destination address
216
6. Router Management, Firewall Filters, and Accounting
15:43:39 MARTIAN01-fxp1.0-i R fxp0.0 IGM 192.168.100.1 224.0.0.1
15:43:30 MARTIAN01-fxp1.0-i R fxp0.0 TCP 192.168.254.2 192.168.254.70:23
15:43:24 MARTIAN01-fxp1.0-i R fxp0.0 TCP 192.168.254.2 192.168.254.70:23
15:43:21 MARTIAN01-fxp1.0-i R fxp0.0 TCP 192.168.254.2 192.168.254.70:23
15:40:39 MARTIAN01-fxp1.0-i R fxp0.0 IGM 192.168.100.1 224.0.0.1
15:39:27 MARTIAN01-fxp1.0-i R fxp0.0 UDP 192.168.254.69 255.255.255.255:68
15:39:27 MARTIAN01-fxp1.0-i R fxp0.0 UDP 192.168.254.69 255.255.255.255:67
15:39:19 MARTIAN01-fxp1.0-i R fxp0.0 UDP 192.168.254.69 255.255.255.255:68
You can also clear the various firewall counters with the clear firewall command as shown below:
user@Chicago> clear firewall ?
Possible completions:
all Clear all firewall counters
counter Counter name
filter Filter name
Accounting
It is a fundamental need of all networks to gather the statistics that enable effective billing. Being able to recover
your costs is key to being profitable and ultimately successful. JUNOS has two types of accounting profiles
available for your use:
1. Interface accounting
2. Firewall filters
www.ebook-converter.com
Each type is configured in a different hierarchical level in the CLI. You cannot, however, use both; you must use
one or the other. JUNOS will give you an error if you try to violate this. We are going to configure accounting
here, but a note of caution: There is not much tangible information on these features in the JUNOS
documentation, so we will do our best to make the process and results understandable.
In this configuration example, we were setting out to use accounting to count all the ICMP Echo Request &
Replies (e.g., pings) that are directed at interface fxp0, which represents the routing engine. The first thing we
configure is the accounting options, which control the creation of the actual files, which in turn record the
accounting activity as it occurs on the router. The specific configuration will allow for three files to be created.
user@Chicago# edit accounting-options
[edit accounting-options]
user@Chicago# show
file file1 {
files 3;
}
217
6. Router Management, Firewall Filters, and Accounting
[edit accounting-options]
filter-profile filter1 {
file file1;
interval 1;
counters {
count1;
}
}
Since this is a firewall-filter-based accounting solution, we will need to configure a firewall filter to classify the
packets we wish to account for. In this example, we chose ICMP as described previously. The first part is to
create a firewall filter icmpcount and assign the name filter1 to the accounting profile. This accounting
profile name should match the filter profile name from the accounting-options configuration. We create our first
term statement (e.g., term1) to classify ICMP traffic, and then count it into the name count1, which also
corresponds to the name used in the accounting-options configuration. Then, the second term is added to allow
all other traffic through.
user@Chicago# top
[edit]
user@Chicago# edit firewall filter icmpcount
www.ebook-converter.com
icmp-type [ echo-reply echo-request ];
}
then {
count count1;
accept;
}
}
term term2 {
then accept;
}
www.ebook-converter.com
filter1,1012253589,fxp0.0,icmpcount,count1,210,17469
filter1,1012253649,fxp0.0,icmpcount,count1,443,27339
filter1,1012253709,fxp0.0,icmpcount,count1,564,32650
filter1,1012253769,fxp0.0,icmpcount,count1,592,33794
filter1,1012253829,fxp0.0,icmpcount,count1,790,42077
[edit]
user@Chicago# exit
Exiting configuration mode
user@Chicago> exit
Chapter Summary
This chapter started with the mechanics surrounding managing a network through the use of SNMP. The
operation and history of SNMP were discussed briefly with a focus on how SNMP accomplishes the managing of
a network element. Then, some of the unique features surrounding SNMP in a Juniper Networks router and how
Downloader demo watermarks
to configure a router properly were examined.
This chapter also covered securing the router through the use of firewall filters. As you recall, this is the Juniper
Networks terminology for ACLs and packet filtering. Through the use of a firewall filter, how to configure a
router and deploy some of the advanced features was demonstrated. Some examples of how to secure a Juniper
Networks router using them were provided as well. Additionally, the use of firewall filters also provides the
219
6. Router Management, Firewall Filters, and Accounting
ability to conduct rate limiting and traffic policing.
Many networks are now using and actively deploying accounting as a means to track traffic more efficiently.
This tracking could result in a bill for a customer or can allow for the monitoring of a circuit to an upstream
provider to ensure it is billing your network correctly.
References
Bibliography
Case Study: Securing a Juniper Networks Router
This case study has been designed to provide you with a secure template with comments that explain the various
firewall filters and other parameters. The goal of this template is to ensure that any Juniper Networks router can
be completely and fully secured. Of course, the configuration here is super safe; however, your network may
have other security tools in place already. Please feel free to alter and adjust this configuration file as needed to
meet your needs.
In Figure 6-12 we have named the Juniper Networks router secure-router-01 and placed it as the router
that connects our network to the Internet. This connection is, of course, GigE!
www.ebook-converter.com
www.ebook-converter.com
root-authentication {
encrypted-password "<PASSWORD>"; # SECRET-DATA
}
/* Enable TACACS+ authentication. */
tacplus-server {
7.7.7.5 {
secret "<PASSWORD>"; # SECRET-DATA
/* Wait 5 seconds until timeout */
timeout 5;
}
}
login {
/* A stern Message of the Day (MOTD) banner */
message “********************************************************\n
* [WARNING] secure-router-01 *\n
* This system is owned by [COMPANY]. If you are not *\n
* authorized to access this system, exit immediately. *\n
www.ebook-converter.com
encrypted-password "<PASSWORD>"; # SECRET-DATA
}
}
/* This is a view-only user account */
user ops {
full-name Operations;
uid 2001;
class view-only;
authentication {
encrypted-password "<PASSWORD>"; # SECRET-DATA
}
}
/* This is the template account used by TACACS+ and MUST be here.
TACACS+ is limited to 1 template account, RADIUS can have many */
user remote {
full-name "All remote users";
uid 9999;
/* List of IPs and their hostnames to allow easy English reference to the
devices within the network */
static-host-mapping {
222
6. Router Management, Firewall Filters, and Accounting
/* Put localhost entry for NTP to work */
localhost inet 127.0.0.1;
firewall-ext inet 6.6.6.1;
firewall-int inet 7.7.7.1;
upstream inet 5.5.5.1;
utility inet 7.7.7.5;
syslog inet 7.7.7.8;
}
/* Enable router services */
services {
/* Enable 5 ssh sessions. Max 10 connection attempts per minute. */
ssh connection-limit 5 rate-limit 10;
}
syslog {
/* Archive old files up to 10MB total (1 MB per file), thereby giving
a good historical view of what is happening on the router*/
archive size 1m files 10;
user * {
any emergency;
}
/* Transmit log data over to the corporate syslog server */
host 7.7.7.8 {
any info;
}
file messages {
any notice;
www.ebook-converter.com
authorization info;
}
}
/* Synchronize the clock with a trusted authenticated NTP server */
ntp {
authentication-key 6767 type md5 value "<PASSWORD>"; # SECRET-DATA
/* NTP will not sync if times are too different, so remember to set
the router's time at bootup */
boot-server 7.7.7.5;
server 7.7.7.5;
}
}
chassis {
/* Disable source routing */
no-source-route;
}
www.ebook-converter.com
/* Filter outbound packets from the internal network */
filter {
input outbound-filter;
}
address 6.6.6.254/24;
}
}
}
/* Configure management interface. Cannot route over this. */
fxp0 {
description "Management Interface – OOB management"
unit 0 {
family inet {
no-redirects;
address 10.10.11.11/24;
}
}
www.ebook-converter.com
output {
cflowd 7.7.7.5 {
port 2055;
version 8;
no-local-dump;
autonomous-system-type origin;
aggregation {
autonomous-system;
}
}
}
}
}
snmp {
description secure-router-01;
location "Site, Row, Rack, Shelf";
contact "(555) 555-5555";
www.ebook-converter.com
/* Route to network on the other side of the Firewall */
route 7.7.7.0/24 next-hop 6.6.6.1;
/* Black-hole routes for traffic destined to these networks */
route 0.0.0.0/8 discard;
route 1.0.0.0/8 discard;
route 2.0.0.0/8 discard;
route 5.0.0.0/8 discard;
route 7.0.0.0/8 discard;
route 10.0.0.0/8 discard;
route 23.0.0.0/8 discard;
route 27.0.0.0/8 discard;
route 31.0.0.0/8 discard;
route 36.0.0.0/8 discard;
route 37.0.0.0/8 discard;
route 39.0.0.0/8 discard;
route 41.0.0.0/8 discard;
route 42.0.0.0/8 discard;
www.ebook-converter.com
route 99.0.0.0/8 discard;
route 100.0.0.0/8 discard;
route 101.0.0.0/8 discard;
route 102.0.0.0/8 discard;
route 103.0.0.0/8 discard;
route 104.0.0.0/8 discard;
route 105.0.0.0/8 discard;
route 106.0.0.0/8 discard;
route 107.0.0.0/8 discard;
route 108.0.0.0/8 discard;
route 109.0.0.0/8 discard;
route 110.0.0.0/8 discard;
route 111.0.0.0/8 discard;
route 112.0.0.0/8 discard;
route 113.0.0.0/8 discard;
route 114.0.0.0/8 discard;
route 115.0.0.0/8 discard;
www.ebook-converter.com
23.0.0.0/8;
27.0.0.0/8;
31.0.0.0/8;
36.0.0.0/8;
37.0.0.0/8;
39.0.0.0/8;
41.0.0.0/8;
42.0.0.0/8;
49.0.0.0/8;
50.0.0.0/8;
58.0.0.0/8;
59.0.0.0/8;
60.0.0.0/8;
69.0.0.0/8;
70.0.0.0/8;
71.0.0.0/8;
72.0.0.0/8;
www.ebook-converter.com
108.0.0.0/8;
109.0.0.0/8;
110.0.0.0/8;
111.0.0.0/8;
112.0.0.0/8;
113.0.0.0/8;
114.0.0.0/8;
115.0.0.0/8;
116.0.0.0/8;
117.0.0.0/8;
118.0.0.0/8;
119.0.0.0/8;
120.0.0.0/8;
121.0.0.0/8;
122.0.0.0/8;
123.0.0.0/8;
124.0.0.0/8;
www.ebook-converter.com
if-exceeding {
bandwidth-limit 500k;
burst-size-limit 62k;
}
then discard;
}
/* Rate-limit for 2 m/s used for UDP */
policer 2m {
if-exceeding {
bandwidth-limit 2m;
burst-size-limit 250k;
}
then discard;
}
/* The first three terms have been separated for accounting only */
term 1 {
from {
www.ebook-converter.com
count spoof-inbound-rfc1918;
log;
discard;
}
}
/* Discard all ICMP fragments */
term 4 {
from {
is-fragment;
protocol icmp;
}
then {
count icmp-fragments;
log;
discard;
}
}
www.ebook-converter.com
}
/* Allow access to Intranet (firewall filters specific ports) */
term 8 {
from {
destination-address {
7.7.7.0/24;
}
}
then accept;
}
www.ebook-converter.com
then {
count packets-syn;
log;
accept;
}
}
term 2 {
from {
protocol tcp;
}
then {
count packets-tcp;
accept;
}
}
}
/* Apply this filter inbound on interface loopback 0 in order to restrict
www.ebook-converter.com
count manage-discard-udp;
log;
discard;
}
}
www.ebook-converter.com
www.ebook-converter.com
[ch06bib16] www.snmp.com
Introduction to Interfaces
The interfaces on a router are used to communicate with other connected network devices. Interfaces come in many different
types and speeds. Interfaces for Juniper Networks routers can be electrical or optical, and they can range in speed from
thousands to tens of billions of bits per second, depending on the need.
A router uses interfaces to connect to physically external devices. In addition, a router has some interfaces that are internal
www.ebook-converter.com
virtual interfaces to assist the Internet processor. These interfaces are created in router memory and cannot be physically
touched.
Juniper Networks routers support a diverse set of physical interfaces, or ports, that can accommodate the needs of most ISPs
and large-enterprise networks. The range in available bandwidths of interfaces for a Juniper Networks router is currently DS-0
(DS-3 with channels down to the 64Kbps level) to OC-192 (10Gbps). In addition to the wide range of bandwidths offered,
Juniper Networks offers a variety of different types of interfaces. POS, ATM, Fast Ethernet, and GigE are just some of the
different interfaces Juniper Networks offers for its routers. Physical interfaces technically also include the console interface
because it enables communications from outside the router. The list of available interfaces grows constantly as technology is
enhanced and bandwidth requirements increase.
Internal virtual router interfaces are created in memory and in the processes of the routing engine. Virtual interfaces serve a
variety of purposes, including acting as points for forwarding data in a manner similar to physical interfaces. One very
important virtual interface is the loopback interface. The loopback interface can be used for giving a router a stable IP address
for identity. Other virtual interfaces can include generic route encapsulation (GRE) and IP-IP tunnel interfaces. These types of
interfaces are internal to the Internet processor and are used to set up virtual connections to other routers with tunnel interfaces
for data forwarding. Some virtual interfaces, such as the GRE and IP-IP tunnel interfaces, require specialized hardware to
implement.
www.ebook-converter.com
The physical port on router New York must be properly configured to communicate with the switch; otherwise, the logical
units will not be able to communicate properly with the other routers. Once the physical communication is working, then the
logical interfaces can be configured. In practice, both are configured at the same time or one at a time, but the important thing
to remember is that the logical unit is dependent on the physical interface.
www.ebook-converter.com
on the router.
Since different types of PICs have different configuration parameters and characteristics, a way of differentiating between the
types of PICs must be used. To identify which type of PIC is being configured, Juniper Networks uses JUNOS software
designation codes listed in Table 7-1.
Table 7-1. Interface Types and JUNOS Software Designations
www.ebook-converter.com
unit 105 {
vci 105;
family inet {
address 192.168.105.1/30;
}
}
lab@Boston>
www.ebook-converter.com
To find out which physical PICs are installed in the router, the show chassis hardware command can be used. As shown
here, when the command is run on router Boston, the various PICs installed in FPCs 0, 2, and 3 are shown below each FPC
entry:
[edit]
lab@Boston# run show chassis hardware
Hardware inventory:
Item Version Part number Serial number Description
Chassis 20797 m40
Backplane REV 02 710-001348 AB6859
Power supply A REV 04 740-000234 000963 AC
Power supply B REV 04 740-000234 000961 AC
Maxicab REV 07 710-000229 AF8436
Minicab REV 03 710-000482 AE9763
Display REV 08 710-000150 AE9963
Host Present
SCB REV 02 710-001838 AF7654 Internet Processor II
FPC 0 REV 10 710-000175 AA4830
PIC 0 REV 06 750-000616 AA6736 1x OC-12 ATM, MM
241
7. Interface Configuration
FPC 3 REV 09 710-000175 AA6064
PIC 3 REV 03 750-000612 AA1774 2x OC-3 ATM, MM
Looking at the output, you can now differentiate the name assignments of the FPCs, PICs, interfaces, and logical units.
Position Numbering
The position and numbering of an FPC and a PIC can be a bit confusing and needs some explanation. The numbering changes
not only on the position the card holds in the router, but it also depends on the router that you are using, as we will explain in
the next section.
www.ebook-converter.com
If there are only two ports in a PIC, the assignment number starts at 0 for the top port and the bottom will be 1. If there is only
one interface port on a PIC, then the port assignment is 0.
FPC and PIC Numbering for the M5, M10, and M20
The M5, M10, and M20 routers have much smaller chassis than the M40 and M160. The FPC slots are inserted horizontally to
ensure proper airflow. The FPC slots are numbered top to bottom; the PICs are numbered right to left. The ports are numbered
left to right, bottom to top starting at the bottom right and moving left. All Juniper Networks router-numbering schemes begin
with 0. Figure 7-4 illustrates the interface assignment for the horizontal chassis of the M20. The gray port is assigned the
number 0/3/0 and the shaded port is assigned the number 1/2/3.
242
7. Interface Configuration
Interface Configuration Basics
Configuration commands for router interfaces in JUNOS software are located in the [edit interfaces (interface)]
command hierarchy of the command-line interface, where (interface) represents the interface you wish to configure. Both
the physical ports and logical units are configured from this hierarchy level. As you can see below, the configurable transient
physical interfaces, which already have some elements configured on router New York are shown. In addition, loopback0
(lo0) and the management fxp0 are listed.
[edit interfaces]
lab@newyork# set ?
Possible completions:
<interface_name> Interface name
+ apply-groups Groups from which to inherit configuration data
at-0/1/0
at-0/1/1
fe-0/0/0
fe-0/0/1
fe-0/0/3
fxp0
ge-0/2/0
ge-0/3/0
lo0
so-0/3/0
> traceoptions Interface trace options
[edit interfaces]
lab@newyork#
To configure a logical unit, the hierarchy for the physical interface that will carry that logical unit must be entered. To edit the
ATM interface for port 0/1/1 or to configure logical units on 0/1/1, the set commands must be entered. For this example, the
prompt was moved to the directories where the commands were located to show the possible command completions.
www.ebook-converter.com
[edit interfaces]
lab@newyork# edit at-0/1/1
243
7. Interface Configuration
Changes made to the configuration of a physical interface will affect both the interface and all logical units created on it. For
example, if you use the set disable command on the physical interface, no logical units on the physical interface will be
able to communicate.
Network Addressing
Although there are several types of protocol families and addresses that can be assigned to a logical unit, the discussion in this
chapter will discuss IP network addressing (known as family inet). The other family addresses, such as MPLS and ISO, will be
www.ebook-converter.com
discussed in their respective protocol chapters. The IP protocol family is assigned to a unit using the command inet, and then
an IP address can be assigned under that family as shown below:
[edit interfaces fe-0/0/3 unit 0]
lab@newyork# set family ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
> inet Internet protocol (IPv4) parameters
> iso OSI ISO protocol parameters
> mpls MPLS protocol parameters
[edit interfaces fe-0/0/3 unit 0]
lab@newyork# set family
Once you are in the unit hierarchy of the logical unit, the command to add an IP address is set family inet address
(address/mask), as is demonstrated next:
[edit interfaces fe-0/0/3 unit 0]
lab@newyork# set family inet address 192.168.50.5/24
www.ebook-converter.com
lab@chicago# edit interfaces fe-0/0/1
lab@chicago>
Some key items are highlighted in the above output. First, note the split groups between the physical interface properties and
the logical interface properties. After the physical interface properties are listed, all logical units will be listed with their
configurations in unit order. Next, note that the physical interface is Enabled. If the interface were disabled by manual
configuration, this field would read Administratively Down. To administratively re-enable a physical interface that has
been disabled, use the command delete disable in the interface hierarchy.
To ensure connectivity and proper configuration to another connected router's interface, use the ping command from the CLI
operational command prompt to ping the configured IP address on the other router as shown below:
lab@chicago> ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1): 56 data bytes
64 bytes from 192.168.20.1: icmp_seq=0 ttl=255 time=0.982 ms
64 bytes from 192.168.20.1: icmp_seq=1 ttl=255 time=0.808 ms
64 bytes from 192.168.20.1: icmp_seq=2 ttl=255 time=0.782 ms
64 bytes from 192.168.20.1: icmp_seq=3 ttl=255 time=0.829 ms
64 bytes from 192.168.20.1: icmp_seq=4 ttl=255 time=0.789 ms
www.ebook-converter.com
64 bytes from 192.168.20.1: icmp_seq=5 ttl=255 time=0.813 ms
^C
--- 192.168.20.1 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.782/0.834/0.982/0.068 ms
lab@chicago>
The interface is now up and configured. On occasion, autonegotiation of speed and duplex mode can fail. This can be more
prevalent in older Ethernet implementations. In cases where the two connected interfaces cannot decide on an agreeable
configuration, it is necessary to manually configure, or “nail up,” the link to a particular speed and mode. The following
physical interface is set to full-duplex, and the speed to 100Mbps:
[edit interfaces fe-0/0/1]
lab@chicago# set speed 100m
246
7. Interface Configuration
lab@chicago# show
speed 100m;
link-mode full-duplex;
unit 0 {
family inet {
address 192.168.20.2/24;
}
}
www.ebook-converter.com
Figure 7-5. VLAN Configuration
Router New York is directly connected to a VLAN-capable switch and needs to be configured to talk to Chicago on one subnet
and Boston on another over the same Fast Ethernet port. The first step in configuring VLANs is to enable VLAN tagging on the
physical interface, as shown below:
[edit interfaces fe-0/0/1]
lab@newyork# set vlan-tagging
www.ebook-converter.com
Fast Ethernet 0/0/1 now has two logical units configured in VLANs on unit 20 and unit 30. To check the connectivity and
operation of the VLANs, ping the interfaces of routers Chicago and Boston.
lab@newyork> ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1): 56 data bytes
64 bytes from 192.168.20.1: icmp_seq=0 ttl=255 time=0.965 ms
64 bytes from 192.168.20.1: icmp_seq=1 ttl=255 time=0.788 ms
64 bytes from 192.168.20.1: icmp_seq=2 ttl=255 time=0.763 ms
64 bytes from 192.168.20.1: icmp_seq=3 ttl=255 time=0.783 ms
^C
--- 192.168.20.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.763/0.825/0.965/0.082 ms
248
7. Interface Configuration
lab@newyork>
All of the pings were successful, thus showing us that the VLANs are working. Check the interface using the CLI show
interfaces command to see the specifics of what is occurring on the interface.
lab@newyork> show interfaces fe-0/0/1
Physical interface: fe-0/0/1, Enabled, Physical link is Up
Interface index: 10, SNMP ifIndex: 14
Link-level type: Ethernet, MTU: 1518, Speed: 100mbps, Loopback: Disabled,
Source filtering: Disabled, Flow control: Enabled
Device flags : Present Running
Interface flags: SNMP-Traps
Current address: 00:90:69:9e:80:01, Hardware address: 00:90:69:9e:80:01
Input rate : 0 bps (0 pps)
Output rate : 0 bps (0 pps)
Active alarms : None
Active defects : None
www.ebook-converter.com
Protocol inet, MTU: 1500, Flags: None
Addresses, Flags: Is-Preferred Is-Primary
Destination: 192.168.30/24, Local: 192.168.30.3,
Broadcast: 192.168.30.255
lab@newyork>
Two things to note in the output above: the VLAN ID for the logical unit and the packet counters. Each logical unit counts
packets that have been sent and received.
Note
249
7. Interface Configuration
[edit interfaces fe-0/0/1]
lab@newyork# edit fastether-options
[edit interfaces fe-0/0/1 fastether-options]
lab@newyork# set source-filtering
[edit interfaces fe-0/0/1 fastether-options]
lab@newyork#
Now try to ping either Chicago or Boston. The ping packets will be sent to them, but their replies will be ignored because there
is not an allowed MAC address list defined yet. This action is such that the router will implicitly deny all unless told to permit
something.
[edit interfaces fe-0/0/1 fastether-options]
lab@newyork# run ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1): 56 data bytes
^C
--- 192.168.20.1 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss
[edit interfaces fe-0/0/1 fastether-options]
lab@newyork#
The next step is to assign in a list the MAC addresses that are to be permitted access. Only those listed devices that have
permission to be received by router New York on that particular interface will have their packets flow through the router. This
list is created in the [edit interfaces fe-0/0/1 fastether-options] hierarchy. Use the set source-
address-filter (MAC address) command to add MAC addresses to the list. Router Chicago's MAC address,
00:90:69:a4:d8:01, will be added.
[edit interfaces fe-0/0/1 fastether-options]
lab@newyork# set source-address-filter 00:90:69:a4:d8:01
www.ebook-converter.com
lab@newyork> ping 192.168.20.1
PING 192.168.20.1 (192.168.20.1): 56 data bytes
64 bytes from 192.168.20.1: icmp_seq=0 ttl=255 time=1.661 ms
64 bytes from 192.168.20.1: icmp_seq=1 ttl=255 time=0.801 ms
64 bytes from 192.168.20.1: icmp_seq=2 ttl=255 time=0.785 ms
^C
--- 192.168.20.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.785/1.082/1.661/0.409 ms
lab@newyork> ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1): 56 data bytes
^C
--- 192.168.30.1 ping statistics ---
6 packets transmitted, 0 packets received, 100% packet loss
Router New York can now receive ping replies from Chicago, but not from Boston because Boston's MAC address was not
added to the list of accepted addresses.
www.ebook-converter.com
data through that IP address, New York will receive it and forward the data. If New York goes offline, Chicago will take over
receiving data for the virtual IP address.
Balancing Bandwidth
Besides redundancy, another reason to have more than one router on a path out of a network is to have another router share in
the traffic forwarding. If groups of hosts or routers have different routers on the network manually set as the default gateway,
the traffic-forwarding load can be shared. But this is a labor-intensive process and does not protect the network if one router
goes down because, then, half the hosts would not be able to access the network. Thus, with VRRP you can create that single
virtual IP address that everyone can use and have the routers load-balance traffic for more effective use of them. By default, in
VRRP all the statically configured hosts will send traffic to the single master router for a given virtual IP. Truer load balancing
can be achieved through the use of multiple groups.
VRRP allows more than one group to be configured for a network. This will enable different routers to act as master and
backup for different virtual IP address. In Figure 7-7, router New York is master for 192.168.30.1 and backup for
192.168.30.2. Router Chicago is master for 192.168.30.2 and backup for 192.168.30.1.
www.ebook-converter.com
Figure 7-7. VRRP Multiple Groups
To enable multiple virtual IP addresses with differing priorities and such, separate groups can be configured on the network
interface. Each of these VRRP groups can have different settings for virtual IP addresses, priority, preemption, and so forth,
based on the desired default and fail-over forwarding. How do backup routers know when a master has failed?
Master routers send out advertisements to other routers in the group to let them know of the master's status. These
advertisements are sent, by default, once per second. The advertisements contain such information as the group ID, virtual IP
addresses of this group, the master's priority, the group's advertisement interval, and any authentication information used
between VRRP-enabled routers in a group.
Since devices have unique MAC addresses on a network, a virtual MAC address is also needed to allow different routers to
252
7. Interface Configuration
VRRP Configuration
VRRP configuration on a Juniper Networks router takes place at the [edit interfaces (int#) unit (#) family
inet address (addr)] hierarchy level. Due to the fact that logical units are on different networks and each logical unit
can have multiple IP addresses, the VRRP group is defined under a specific IP address. The virtual IP address or addresses for
the group should fall within the same subnet as the address of the logical unit.
You first create the VRRP group; then, the virtual IP address is assigned. In Figure 7-8, routers New York and Chicago have
two VRRP groups configured. Router New York is the master of virtual IP address for Group 10, while router Chicago is the
master of Group 20.
www.ebook-converter.com
[edit interfaces fe-0/0/1]
lab@newyork# show
speed 100m;
link-mode full-duplex;
unit 0 {
family inet {
address 192.168.30.3/24;
}
}
Router Chicago
[edit interfaces fe-0/0/1]
lab@chicago# show
speed 100m;
link-mode full-duplex;
unit 0 {
}
Downloader demo watermarks
family inet {
}
address 192.168.30.4/24;
www.ebook-converter.com
lab@newyork# set priority 90
New York's interface configuration looks as follows when completed:
[edit interfaces fe-0/0/1 unit 0 family inet]
lab@newyork# show
address 192.168.30.3/24 {
vrrp-group 10 {
virtual-address 192.168.30.1;
priority 110;
}
vrrp-group 20 {
virtual-address 192.168.30.2;
priority 90;
}
}
[edit interfaces fe-0/0/1 unit 0 family inet]
lab@newyork#
lab@newyork>
Router New York has two VRRP groups enabled on fe-0/0/1 unit 0. The local unit IP address is shown along with the
virtual IP address for that group. Currently, router New York is master for both groups because Chicago has not yet been
configured.
Note
If the no-preempt option is to be used, then configure the groups by master router first. If the groups are all
configured on one router at a time, the first router configured will be master for all the groups. None of the other
routers with higher priorities for those groups will be able to take over as intended because they are not allowed to
preempt the master, even if they have a higher priority. Only if the master were to fail would an election take place
for each group. In this example, if you were to use the no-preempt option, you would configure router New York's
VRRP Group 10 and then router Chicago's Group 20. Then New York and Chicago can be configured for their
backup groups.
Router Chicago will get the opposite configuration as New York, meaning that by design router Chicago will be the backup for
the group in which router New York is master, while Chicago is the master for the group in which router New York is the
backup. In this manner, the routers can split the duties and the work of being masters of the VRRP groups.
[edit interfaces fe-0/0/1]
lab@chicago# edit unit 0 family inet address 192.168.30.4/24
[edit interfaces fe-0/0/1 unit 0 family inet address 192.168.30.4/24]
lab@chicago# set vrrp-group 10 virtual-address 192.168.30.1
www.ebook-converter.com
[edit interfaces fe-0/0/1 unit 0 family inet address 192.168.30.4/24]
lab@chicago# set vrrp-group 10 priority 90
255
7. Interface Configuration
[edit interfaces fe-0/0/1 unit 0 family inet]
lab@chicago#
Showing the VRRP information on New York again, router Chicago has been configured as a higher priority for VRRP Group
20 than router New York. Router Chicago takes over.
lab@newyork> show vrrp
Interface Unit Group Type Address Int state VR state Timer
fe-0/0/1 0 10 lcl 192.168.30.3 up master A
0.890
vip 192.168.30.1
fe-0/0/1 0 20 lcl 192.168.30.3 up backup D
2.768
vip 192.168.30.2
mas 192.168.30.4
lab@newyork>
Notice one other change in the output shown here. Another Type and Address entry has been made for Group 20 that shows
who the master is for that group (using the actual interface address of Chicago) because the master is no longer router New
York.
Ethernet is the most popular of the LAN technologies because it is inexpensive, easily implemented, very scalable, and
available in a wide variety of interfaces, ranging from 10Mbps to 10Gbps. Although it is a broadcast-type data link protocol
that has the potential for problems in large broadcast domains, newer standards allow for improvements by supporting such
features as VRRP and MAC address filtering.
SONET/SDH Interfaces
Although SONET has actually been around for some time in the nonconcatenated form, POS is a relatively new
www.ebook-converter.com
implementation. Due to its extremely high bandwidth capabilities, coupled with its very low overhead, POS has been making
very fast in-roads in the Datacom world.
Juniper Networks supports the full range of current POS speeds, from OC-3 to OC-192. OC-192, at approximately 10Gbps, is
at the time of writing one of the fastest commercially available interfaces, and Juniper Networks is one of the few companies
that offers it. These high-bandwidth interfaces allow Internet providers to drastically increase the capability of their core
infrastructure to meet the high use demands of Internet users.
SONET and SDH are basically two sides of the same coin. SONET is primarily a U.S. standard, while most of the rest of the
world uses SDH. For configuration purposes, and unless otherwise specified, the term SONET in this section will represent both
SONET and SDH.
SONET is an optical timing protocol that works at the physical layer of the OSI model. An encapsulation type for the data link
layer needs to be defined and configured to enable the upper layers to communicate. Juniper Networks offers three
encapsulation types for physical SONET interfaces: PPP, Cisco-HDLC, and Frame Relay. PPP is the Juniper Networks
SONET default and does not need to be configured explicitly. Because Cisco-HDLC and PPP are both point-to-point
protocols, if they are configured on the physical interface, there can be only one logical unit configured. If the encapsulation is
Frame Relay, a multiaccess protocol, more than one unit can be configured on a physical interface.
PPP Configuration
SONET characteristics for the interface are configured at the physical interface hierarchy level. This is where such parameters
as clocking, keepalive intervals, and physical interface encapsulation are configured. In addition to those parameters listed
above, there is a subhierarchy called sonet-options, where SONET parameters, such as FCS, payload scrambling, and
header byte configuration options, can be configured.
POS interfaces on Juniper Networks routers default to the following settings: payload scrambling enabled, 16-bit FCS, 10-
second interval keepalives, PPP encapsulation, internal clocking, and 4,474-byte MTU. A default physical SONET
interface looks as follows:
www.ebook-converter.com
lab@newyork> show interfaces so-0/3/0
Physical interface: so-0/3/0, Enabled, Physical link is Up
Interface index: 16, SNMP ifIndex: 25
Link-level type: PPP, MTU: 4474, Clocking: Internal, SONET mode, Speed:
OC12,
Loopback: None, FCS: 16, Payload scrambler: Enabled
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps
Link flags : Keepalives
Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3
Keepalive: Input: 27 (00:00:03 ago), Output: 27 (00:00:08 ago)
LCP state: Opened
NCP state: inet: Opened, iso: Not-configured, mpls: Not-configured
Input rate : 0 bps (0 pps)
Output rate : 0 bps (0 pps)
SONET alarms : None
SONET defects : None
www.ebook-converter.com
loopback Loopback mode
no-payload-scrambler Don't enable payload scrambling
no-z0-increment Don't increment Z0 in SDH mode
path-trace Path trace string
> payload-scrambler Enable payload scrambling
rfc-2615 RFC 2615 compliance
z0-increment Increment Z0 in SDH mode
[edit interfaces so-0/3/0 sonet-options]
lab@chicago#
Now we will look at the three encapsulation types (with their CCC counterparts) possible under the SONET interface
encapsulation. The following output is an example of the options for the set encapsulation command under a SONET
interface:
[edit interfaces so-0/3/0]
lab@chicago# set encapsulation ?
Possible completions:
cisco-hdlc Cisco-compatible HDLC framing
cisco-hdlc-ccc Cisco-compatible HDLC framing for a cross connection
frame-relay Frame Relay encapsulation
www.ebook-converter.com
[edit interfaces so-0/3/0]
lab@newyork# set unit 0 family inet address 192.168.40.2/30
The configuration is checked by successfully pinging the other interface.
lab@newyork> ping 192.168.40.1
PING 192.168.40.1 (192.168.40.1): 56 data bytes
64 bytes from 192.168.40.1: icmp_seq=0 ttl=255 time=0.860 ms
64 bytes from 192.168.40.1: icmp_seq=1 ttl=255 time=0.748 ms
64 bytes from 192.168.40.1: icmp_seq=2 ttl=255 time=0.765 ms
^C
--- 192.168.40.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.748/0.791/0.860/0.049 ms
lab@newyork>
Now, look at the so-0/3/0 interface for router Chicago. The Link Control Protocol and Network Control Protocol (family
www.ebook-converter.com
Frame Relay PVCs. Juniper Networks routers support the two common LMI types: ANSI and ITU. A DLCI is configured on
the logical units to differentiate the origin of the data.
In Figure 7-10, routers Chicago and New York have a point-to-point Frame Relay connection between them using DLCI 103.
First New York is configured. Under the physical SONET interface, the encapsulation is set to Frame Relay. Afterwards, the
unit parameters and the IP address are configured. For back-to-back Frame Relay connections, either disable the sending of
keepalives on both sides of the connection, or configure one side of the connection as a DTE (the default JUNOS
configuration) and the other as a DCE.
www.ebook-converter.com
lab@chicago# set encapsulation frame-relay
[edit interfaces so-0/3/0]
lab@chicago# set no-keepalives
[edit interfaces so-0/3/0]
lab@chicago# set clocking external
www.ebook-converter.com
lab@chicago> show interfaces so-0/3/0
Physical interface: so-0/3/0, Enabled, Physical link is Up
Interface index: 18, SNMP ifIndex: 31
Link-level type: Frame-Relay, MTU: 4474, Clocking: External, SONET mode,
Speed: OC12, Loopback: None, FCS: 16, Payload scrambler: Enabled
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps
Link flags : No-Keepalives DTE
ANSI LMI settings: n391dte 6, n392dte 3, n393dte 4, t391dte 10 seconds
LMI: Input: 0 (never), Output: 0 (never)
Input rate : 0 bps (0 pps)
Output rate : 0 bps (0 pps)
SONET alarms : None
SONET defects : None
Logical interface so-0/3/0.103 (Index 12) (SNMP ifIndex 36)
Flags: Point-To-Point SNMP-Traps Encapsulation: FR-NLPID
Input packets : 10
Output packets: 10
lab@chicago>
In the above output, the ANSI-specified LMI settings can be changed manually as long as both devices are properly
configured. These numbers represent the management functions, such as error thresholds, LMI keepalive timers, and so on.
In addition, the DLCI 103 is shown under the logical unit and the statistics for that PVC.
APS
APS, or automatic protection switching, is a system used to backup SONET connections by fail-over. With APS, devices can
have redundant SONET links between them, one active and one on standby. The active connection is called the working
circuit; the backup link is called the protect circuit. These standby circuits can be connected on another interface on the same
PIC, on another interface on a different FPC, or even on a different router.
APS can be configured between routers, or between ADMs and routers. Figure 7-11 illustrates router-to-router and ADM-to-
router APS configurations. In addition, APS can be configured for concatenated or nonconcatenated SONET interfaces.
SONET is in the nonconcatenated mode for use with channelized TDM circuits. SONET is in the concatenated mode for using
clear channel between devices. SONET concatenation was discussed in Chapter 2.
www.ebook-converter.com
Figure 7-11. APS Configuration Models
APS has several configurable parameters, such as keepalive intervals, authentication, and load sharing. Here we show the
possible commands in the [edit interfaces (interface) sonet-options aps] hierarchy.
[edit interfaces so-0/2/0]
lab@chicago# set sonet-options aps ?
Possible completions:
advertise-interval Advertise interval (milliseconds)
+ apply-groups Groups from which to inherit configuration data
> authentication-key Authentication parameters
force Force circuit state
hold-time Hold time (milliseconds)
lockout Lockout protection
www.ebook-converter.com
192.168.50.2.
[edit interfaces]
lab@chicago# show
fe-0/0/0 {
<<<output omitted for brevity>>>
}
so-0/2/0 {
clocking external;
encapsulation cisco-hdlc;
sonet-options {
aps {
working-circuit juniper;
}
}
unit 0 {
family inet {
address 192.168.50.1/30;
}
lab@chicago>
The first field of the interface state is the administrative state; the second is the physical state. When the protect circuit will not
be used for forwarding traffic while the working circuit is up, the protect circuit will be administratively disabled by the router.
However, the physical state of the interface is Up, as is shown below. Interface so-0/2/0 is Enabled and Up, while
interface so-0/3/0 is Administratively Down and Up.
lab@chicago> show interfaces so-0/2/0
Physical interface: so-0/2/0, Enabled, Physical link is Up
Interface index: 15, SNMP ifIndex: 17
www.ebook-converter.com
Link-level type: Cisco-HDLC, MTU: 4474, Clocking: External, SONET mode,
Speed: OC12, Loopback: None, FCS: 16, Payload scrambler: Enabled
Device flags : Present Running
Interface flags: Point-To-Point ...
lab@chicago>
265
7. Interface Configuration
The most important point of all is whether or not router Chicago can still communicate with router New York on the newly
enabled link. It can, as we see below:
lab@chicago> ping 192.168.50.2
PING 192.168.50.2 (192.168.50.2): 56 data bytes
64 bytes from 192.168.50.2: icmp_seq=0 ttl=255 time=0.795 ms
64 bytes from 192.168.50.2: icmp_seq=1 ttl=255 time=0.735 ms
^C
--- 192.168.50.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.735/0.765/0.795/0.030 ms
lab@chicago>
Of all the types of interfaces Juniper Networks has, SONET is the fastest and is generally preferred for WAN data
communications. Even though ATM is more widely used because of its installation base and acceptance in the Telecom
industry, SONET has much less overhead and can transfer data at much higher rates. Juniper Networks makes a strong case for
migrating core networks to SONET from ATM. This case gets stronger as IP-enhancing features are implemented that allow
policy and service guarantees that are not inherently found in the standard IP protocol.
ATM Interfaces
ATM is a very popular high-speed WAN protocol. Many logical units can be configured on each port, with each logical unit
configured for different QoS options. This can be a powerful tool for connectivity options. The disadvantages of ATM are
extremely high overhead and an upward speed limitation of OC-12.
In addition to the large cell header overhead, the segmentation and reassembly (SAR) of packets to ATM cells and back also
use many resources on an interface, further limiting the overall throughput. Juniper Networks has two ports per PIC for OC-3
ATM and one port per PIC for OC-12 ATM. In addition to the optical ATM interfaces, Juniper Networks implements ATM on
electrical DS-3 and E-3 ports using coaxial cable. Juniper Networks supports standard PVCs on ATM logical units.
www.ebook-converter.com
Juniper Networks enables either PVC encapsulation or ATM CCC encapsulation for cell relay on a physical interface. A
variety of ATM encapsulations can be configured on the PVC logical units. The most common of the PVC encapsulations (and
Juniper Networks default) is ATM-SNAP. ATM-NLPID and ATM-CISCO-NLPID are also available for routing packets. There
are two options for CCC: cell relay and VC-Mux.
Juniper Networks supports three QoS classes on PVCs, defaulting to UBR as the lowest class. VBR and CBR are the other two
classes supported, with CBR being the highest-priority class followed by VBR.
In addition to those features mentioned above, Juniper Networks supports integrated local management interface (ILMI) in its
ATM implementation. ILMI allows management information to flow between directly connected ATM devices, such as the
router and an ATM switch. ILMI is set at VPI 0 VCI 16 when configured on a physical interface.
266
7. Interface Configuration
[edit interfaces at-0/1/0]
lab@newyork# set atm-options ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
> ilmi Enable Interim Local Management Interface
> vpi Define a virtual path
[edit interfaces at-0/1/1]
lab@newyork# set atm-options vpi 1 ?
Possible completions:
maximum-vcs Maximum number of virtual circuits on this VP
[edit interfaces at-0/1/1]
lab@newyork# set atm-options vpi 1 maximum-vcs 250
www.ebook-converter.com
Any traffic-shaping QoS parameters
As mentioned earlier, the default encapsulation for ATM logical units is ATM-SNAP for standard ATM encapsulation of IP
packets. The other possible encapsulation alternatives are shown below:
[edit interfaces at-0/1/0 unit 200]
lab@newyork# set encapsulation ?
Possible completions:
atm-ccc-cell-relay ATM Cell Relay for CCC
atm-ccc-vc-mux ATM VC for CCC
atm-cisco-nlpid Cisco-compatible ATM NLPID encapsulation
atm-nlpid ATM NLPID encapsulation
atm-snap ATM LLC/SNAP encapsulation
atm-vc-mux ATM VC multiplexing
[edit interfaces at-0/1/1 unit 200]
lab@newyork#
The Network Layer Protocol ID (NLPID) is a field used in Frame Relay headers. Frame Relay–type service to ATM networks
requires a Frame Relay–type encapsulation of the packets before they are segmented into the payloads of ATM cells. The IETF
Downloader demo watermarks
standardized one Frame Relay encapsulation and Cisco created another. The difference between the IETF-based NLPID and
Cisco-based NLPID standards is as follows: VC-Mux is the VC-based-multiplexing encapsulation type used when each
protocol gets its own VC. These encapsulation types for ATM are defined in IETF RFC 1483; although RFC 2684 renders 1483
obsolete, Juniper Networks documentation references 1483 explicitly.
When configuring the VPI/VCI for a PVC, if only one VP were assigned to the entire physical interface with the vpi #
267
7. Interface Configuration
maximum-vcs # command, then only one would need to be configured with the VCI assignment. If more than one VP were
assigned to the physical interface, the vpi.vci format would have to be used.
An ATM logical unit can be point-to-point or -multipoint. Juniper Networks ATM logical units default to point-to-point. If that
is the type you want, then you do not have to specify as much during configuration. If you want multipoint configured, then
you will have to configure a destination statement for each destination on the link. This is configured in the family inet
hierarchy with the multipoint-destination (address/xx) command, where the address is the IP address and xx
is the address prefix.
In Figure 7-13, router Chicago has an ATM PVC to router New York using VPI 2 VCI 200.
www.ebook-converter.com
[edit interfaces at-0/1/0 unit 201]
lab@chicago# set vci 2.200
268
7. Interface Configuration
vpi 2 maximum-vcs 250;
}
unit 202 {
vci 2.200;
family inet {
address 192.168.20.2/30;
}
}
www.ebook-converter.com
Protocol inet, MTU: 4470, Flags: None
Addresses, Flags: Is-Preferred Is-Primary
Destination: 192.168.20.0/30, Local: 192.168.20.2
VCI 2.200
Flags: Active
Total down time: 0 sec, Last down: Never
Traffic statistics:
Input packets: 4
Output packets: 4
lab@newyork>
}www.ebook-converter.com
shaping {
cbr 768k;
family inet {
address 192.168.20.1/30;
}
[edit interfaces at-0/1/0 unit 201]
lab@chicago#
VBR has several different parameters. Since the bandwidth allowed is variable, a normal rate limit and a quick temporary high
limit are defined. In addition, the length of the temporary high limit is also defined. The normal limit for a VBR value is known
as the sustained rate, whereas the temporary high limit for a VBR logical unit is known as the peak rate. The maximum
number of cells allowed at the peak rate before the transmission must drop to the sustained rate is known as the burst length.
The configuration options are shown below:
[edit interfaces at-0/1/0 unit 201]
lab@chicago# set shaping vbr ?
Possible completions:
270
7. Interface Configuration
Note
Even though the rates in the parentheses above seem to allow 271Mbps, the ATM interfaces on router New York are
OC-3, with an actual bit rate limit of approximately 135.5Mbps. Juniper Networks implements a limit of 50 percent
of line rate on OC-12 ATM interfaces for CBR and VBR values of 271Mbps. The following is an example of setting
a VC to 384Kbps sustained rate (normal) and 512Kbps peak rate (high limit) and limiting the peak rate to a 32 cell
burst.
[edit interfaces at-0/1/0 unit 201]
lab@chicago# set shaping vbr sustained 384k peak 512k burst 32
www.ebook-converter.com
Figure 7-14. ATM QoS Configuration
You configure the unit 58 and unit 162 in the same manner as unit 201. Do not forget that vpi 1 will have to be
added in the atm-options on the physical interface because unit 58 has a VPI of 1. When it is complete, the
configuration will look as follows:
[edit interfaces at-0/1/0]
lab@chicago# show
atm-options {
vpi 0 maximum-vcs 250;
vpi 2 maximum-vcs 250;
vpi 1 maximum-vcs 250;
}
unit 58 {
Serial Interfaces
Serial interfaces come in several different types and speeds. These interfaces are based on the DS hierarchy from DS-0 to DS-3
of the circuit-switched network types discussed in Chapter 2. These interfaces can be either unchannelized or channelized.
Unchannelized DS hierarchy interfaces are referred to as concatenated because all the channels on the interface are linked
www.ebook-converter.com
together, forming one large bandwidth interface.
Interfaces that are multiplexed into smaller streams are channelized. These channels can be bonded together to transmit data
for a logical unit at a certain bandwidth. The root for these channels is the DS-0 or 64Kbps circuit that is used both in the global
and the U.S. DS hierarchy. DS-1, E1, E3, and DS-3 are all very common implementations of the DS hierarchy, each having a
certain number of DS0s. These DS-0s can be grouped together to form a channel of a required bandwidth. If a logical unit only
needs to be capable of 512Kbps, it can be created by assigning eight DS-0s.
When nonconcatenated, the channels must be assigned to create a single logical unit made up of all the assigned channels.
More detail on the DS hierarchy can be found in Chapter 2. The following sections describe how to configure physical, logical,
and channelized T3s and bit error rate test (BERT) interfaces.
Physical T3 Configuration
The T3 physical parameters are configured in the same manner as the SONET interfaces. Remember that nonconcatenated
SONET was derived from the need to multiplex DS circuits. The most common physical properties are configured under the
physical interface and the t3-options hierarchy. Under the [chassis fpc (#) pic (#)] command, the whole PIC
can be configured for nonconcatenation in the same manner as the SONET PICs. By default, the T3 interfaces are
www.ebook-converter.com
payload-scrambler
start-end-flag
Enable payload scrambling
Set start-end flags on transmission
[edit interfaces t3-2/1/0]
user@Boston#
Note
Do not forget to set clocking on one side of the T3 link to external.
T3 Logical Configuration
With a concatenated interface, logical unit configuration is no different than it is on single-interface ports. A single unit is used
for the family addressing and protocol assignment. Shown here is a concatenated T3 interface configured on router Boston.
Configuring the unit and family inet address is the same as on the previous interfaces in SONET. Notice the clocking
and encapsulation parameters.
[edit interfaces t3-2/1/0]
lab@Boston# show
lab@Boston>
www.ebook-converter.com
T3 Channelized Configuration
Configuring a channelized interface is a little more complicated. Since a channelized T3 is actually 28 T1s, these T1s can be
individually configured. Logical units are made from groups of DS-0s or DS-1s that are bound together to form a logical
interface. Since the T3 interface defaults to concatenated, the first configuration step is to deconcatenate the interface. This is
done on the entire PIC. If you have a 4-port T3 PIC, all four ports will be changed to channelized mode through the use of the
no-concatenate command. Below, PIC 1 of FPC 2 changed to channelized with the set no-concatenate command
in the [edit chassis fpc (x) pic (x)] hierarchy.
[edit]
lab@Boston# edit chassis fpc 2 pic 1
BERT Configuration
A BERT is used to test the quality of a link. One device loops the receive signal to the transmit link, which sends whatever
comes into the interface back to the sender. The sender then can compare what it has sent to what it receives to ensure that
there are no errors. Any errors are counted and reported. In Figure 7-15, two T3 interfaces, A and B, are connected. The
arrows indicate the path the data takes, from Tx (transmit) on one, to Rx (receive) on the other.
www.ebook-converter.com
Figure 7-16. Testing a Looped Interface with a BERT
This loop allows T3 B to put out a stream of characters and compare what was sent to what is received, which in turn allows
testing for errors across the full link. The BER is the Bit Error Rate found during testing. DS-3 B should receive the stream of
123456 exactly as it sent it.
To test a line with the error tester, the far-end connection must be in looped mode. The BERT configuration takes place in the
t3-options of the physical interface, as is shown below. Here are the possible command completions of the set command
(use set b? to show only BERT options):
[edit interfaces t3-2/1/0 t3-options]
lab@chicago# set b?
Possible completions:
bert-algorithm Set BERT algorithm
bert-error-rate Bit error rate to use in BERT test (10^-n) (0..7)
bert-period Length of BERT test (1..240 seconds)
[edit interfaces t3-2/1/0 t3-options]
lab@chicago#
275
7. Interface Configuration
Possible completions:
all-ones-repeating Repeating one bits
all-zeros-repeating Repeating zero bits
alternating-double-ones-zeros Alternating pairs of ones and zeros
alternating-ones-zeros Alternating ones and zeros
pseudo-2e10 Pattern is 2^10 - 1
pseudo-2e11-o152 Pattern is 2^11 -1 (per O.152 standard)
pseudo-2e15-o151 Pattern is 2^15 - 1 (per O.152 standard)
pseudo-2e17 Pattern is 2^17 - 1
pseudo-2e18 Pattern is 2^18 - 1
pseudo-2e20-o151 Pattern is 2^20 - 1 (per O.151 standard)
pseudo-2e20-o153 Pattern is 2^20 - 1 (per O.153 standard)
pseudo-2e21 Pattern is 2^21 - 1
pseudo-2e22 Pattern is 2^22 - 1
pseudo-2e23-o151 Pattern is 2^23 (per O.151 standard)
www.ebook-converter.com
[edit interfaces t3-2/1/0 t3-options]
lab@chicago#
The last configurable item, the bit error rate, allows for errors to be inserted intentionally. It is set to 0 errors by default, but
ranges from 0 to 7. If 5 is entered, the BER becomes 10–5, or 1/100,000, and the BERT process would insert 1 error every
100,000 bits. Inserting errors at a specific rate can be helpful in determining the accuracy of the error checking equipment
along the connection. In addition, if the error rate the interface receives is the same as that it sent out, then the connection is
good both ways, and so is the error rate counter.
Once the configuration is complete, the interface must be disabled before the test can be run. The interface is disabled so that
no other data will be present on the link while the interface is sending the test stream. To run the test, the test command
completions you can use for that particular interface are as follows.
lab@Boston> test interface t3-2/1/0 ?
Possible completions:
e1-bert-start Start BERT
e1-bert-stop Stop BERT
e3-bert-start Start BERT
e3-bert-stop Stop BERT
Notice the error rate. The errors are counted as 1 of every x. If an error occurs every 100 packets, that is 10–2; that is, 1/100 is
10 to the power of negative 2. To stop the complete BERT process, use the bert-stop command shown below:
lab@Chicago> test interface t3-2/1/0 t3-bert-stop
A BERT can be extremely useful when dealing with copper media, which can be more error prone than an optical media type.
It allows the transmission of a set pattern of bits to be sent and the pattern to be checked as it returns.
Aggregated Interfaces
www.ebook-converter.com
Aggregating links means adding them together. If, for instance, you have a 4-port Fast Ethernet PIC on two Juniper Networks
routers, you can use all four ports as one logical interface by aggregating them. This will yield 400Mbps aggregate bandwidth.
Aggregation can be an inexpensive way to increase bandwidth without incurring the cost of new PICs. For instance, an OC-3
SONET interface can have four ports per PIC. If two Juniper Networks routers have an OC-3 POS connection, a second could
be added, and the interfaces could be aggregated for 310Mbps. Ethernet can be aggregated, but the links must be the same
speed. For instance, Fast Ethernet and GigE cannot be mixed.
Aggregation configuration requires creating a single virtual interface to which physical interfaces are assigned. It is the opposite
of the logical unit concept. Logical units are many logical interfaces created in one physical interface. An aggregated interface
is many physical interfaces in a single logical interface. The aggregated interfaces are labeled ae for aggregated Ethernet and
as for aggregated SONET under the [edit interfaces] hierarchy. Once the aggregated interface is created, the same
protocol address families can be added under units in the same manner as a standard interface.
In Figure 7-17, router Chicago and router New York have two Fast Ethernet interfaces directly connected. In the example
below, these two interfaces will be aggregated into a single logical interface and placed in VLAN 50.
www.ebook-converter.com
interface ae0.
[edit interfaces]
lab@chicago# set fe-0/0/1 fastether-options 802.3ad ae0
[edit interfaces]
lab@chicago# set fe-0/0/2 fastether-options 802.3ad ae0
[edit interfaces]
lab@chicago#
When the configuration is complete, it appears as shown below (output has been cut for brevity to show only the pertinent
section):
[edit]
lab@chicago# show
version 5.0R3.3;
...cut
}
www.ebook-converter.com
Interface flags: SNMP-Traps
Current address: 00:90:69:a4:db:f0, Hardware address: 00:90:69:a4:db:f0
Input rate
Output rate
: 0 bps (0 pps)
: 0 bps (0 pps)
www.ebook-converter.com
[edit interfaces]
lab@Chicago# set gr-4/0/0 unit 0 tunnel destination 10.0.32.1
280
7. Interface Configuration
[edit interfaces]
lab@Chicago# show
gr-4/0/0 {
unit 0 {
tunnel {
source 10.0.16.1;
destination 10.0.32.1;
}
family inet;
}
}
<<<output omitted for brevity>>>
To get the packets destined for the London network to go through the tunnel, a static route for that network with a next-hop
of the tunnel interface is added.
[edit routing-options]
lab@Chicago# show
static {
route 10.0.16.0/24 next-hop gr-4/0/0.0;
}
[edit routing-options]
lab@Chicago#
Now, anytime a packet from the headquarters network is destined for the London branch network, it will take the tunnel.
Tunnels are virtual connections that allow routers to think they are directly connected to another network when, in fact, they
are not. The requirement to be directly connected can be bypassed by encapsulating one set of IP packets in another as they
enter the tunnel. Upon tunnel egress, the outside encapsulation is stripped, and the original packet continues on.
www.ebook-converter.com
Loopback
IP devices come with an internal IP address of 127.0.0.1 that is for use internal to the device. The loopback interface is
used as an IP address holder that is independent of any other interface. Configuring a loopback interface creates a logical
internal IP interface for a router that can be used to identify the router to other routers. This use of the loopback as an
identification will be discussed in Chapter 8.
As you will see in Chapter 8 and beyond, when a second IP address is configured on the lo0 (Loopback0) interface, it will
serve as a stable identifier for the router to use in communications protocols. If a router uses an IP address of an interface to
identify itself to other routers, other routers could lose communications if that interface failed. This is because another device
cannot talk to a down interface. The lo0 interface, however, is always up as long as the router is up.
The addressing for the loopback interface is configured just like it is on other interfaces—the family type is assigned, and then
the address is configured. Even though there is no physical presence, the interface has both a physical and unit hierarchy
configuration to maintain configuration consistency. The following is a configured lo0 interface with the host IP address
192.168.5.2:
[edit interfaces lo0]
lab@chicago# show
Downloader demo watermarks
unit 0 {
family inet {
address 192.168.5.2/32;
}
}
281
7. Interface Configuration
[edit interfaces lo0]
lab@chicago#
When a show interfaces command is used, the loopback interface information is displayed just as that of a typical
network interface is, with the physical and logical unit sections separated, as shown below.
lab@chicago> show interfaces lo0
Physical interface: lo0, Enabled, Physical link is Up
Interface index: 5, SNMP ifIndex: 7
Type: Loopback, MTU: Unlimited
Device flags : Present Running Loopback
Interface flags: SNMP-Traps
Link flags : None
Input packets : 10
Output packets: 10
Chapter Summary
The interface is the point at which a router sends data to another device. Since the mission of a router is to forward data
packets through networks, the interface is the sending and receiving component that allows that forwarding to take place.
www.ebook-converter.com
Properly configuring an interface is the first step to the network configuration of a router. This configuration encompasses the
lowest three layers of the OSI model. Physical, data link, and network configurations all take place at the interface and logical
unit hierarchies.
Logical units allow the router to be connected to many more networks than if just the physical interfaces were to be used.
Thousands of network links can be configured on one router through the use of logical units, which Juniper Networks calls
logical units. These units are where the three family addresses are enabled. Even if an interface is not going to have multiple
logical units configured, the single interface has to be configured under a unit.
These interfaces are grouped together in a PIC mounted in a FPC. The FPC can have different types of PIC interfaces
installed, but individual PICs have the same type of interface. There is a system to identify these FPCs with PICs housing
interfaces with logical units. Juniper Networks has a naming convention that identifies them in a specific order from FPC to
logical unit. The two larger routers (M40 and M160) have vertical FPCs, whereas the M5, M10, and M20 have horizontal ones.
The naming convention for the three small chassis is actually the same as that for the larger two routers turned on their right
side (the administrator's right side facing the interfaces).
There are two main components to configuring the interfaces: the physical and the logical. The physical interface has properties
and parameters that affect the entire port and all of the logical units on that port. This can affect timing, signaling, framing, and
the like. The logical interface gets the NBMA and IP addressing assigned, along with any other family-associated configuration.
Bibliography
www.ebook-converter.com
www.ebook-converter.com
www.ebook-converter.com
every network hop.
Dynamic routing protocols can be classified into two groups by function: interior and exterior routing. IGPs, or
Interior Gateway Protocols, are usually used within a network under a single administrative entity. This
administrative entity could be a single company or a single ISP. A very large company or ISP might have to break a
network into several administrative entities to maintain manageability. A network under a single administration is
called an autonomous system, or AS. EGPs, or Exterior Gateway Protocols, are the protocols that are used to
connect different ASs and will be discussed in Chapter 9.
A router's main function is to connect networks together for communication at Layer 3, the network layer of the
OSI model. A Juniper Networks router can be directly connected to hundreds of networks. One router telling
another router of its connected networks is known as advertising. Advertisements need to be standardized so that
routers from different manufacturers can all understand each other.
In Figure 8-1, routers A and B are connected through Network 300. Router A has a direct connection to Network
100, and router B has a direct connection to Network 200. Router A sends an advertisement to router B advertising
Network 100. When a device on Network 200 sends data destined for Network 100, router B understands that it
Downloader demo watermarks
should forward that data out of the interface connected to router A (via Network 300) for forwarding. Router B
knows router A as the next-hop for Network 100 because it is the next router in the route towards Network 100, the
destination.
285
8. IGP Routing Protocol Configuration
Router Metrics
www.ebook-converter.com
When a router receives information about different routes to a destination network, it has to make a decision as to
which route is best. This is known as a routing decision. Different routing protocols will favor different elements of
route information over others. These elements of information, such as how far away a router is (how many routers
away, also known as the hop count) or which are the fastest links to a destination, are collectively known as routing
metrics. Metrics are informational units that can be measured and compared. If the distance to a network is a
determining factor in the routing decision, then the hop count is a metric. Metrics can be different things for
different protocols. RIP might use just the hop count. OSPF uses hop count and bandwidth availability to create a
metric for decision-making purposes.
Metrics can be described as additive in nature. These additive metrics are known as cost functions. The farther an
advertisement travels from the originating routers, the larger the metric grows. The metric to the destination
network in the advertisement is increased as it crosses each hop. In Figure 8-2, notice there are different metrics
associated with the networks connecting the routers. The metric between routers A and B is 2, while the metric
between routers A and D is 3. Router A advertises network 10.0.1.0/24 to routers B and D. When routers B
and D receive the advertisement, they forward their knowledge to router C with the associated metric for that link
added, as shown in Figure 8-3.
www.ebook-converter.com
Figure 8-4. Evaluating Metrics
Metrics may also be manipulated administratively. This allows an administrator to change metrics, thereby causing
routers to change their forwarding behavior as the administrator desires. An administrator for the example shown in
Figure 8-4 could have manually changed the metric of the connection between router B and router A to 5. When
the advertisement reached router C, the total metric would have added up to 7, forcing router C to choose router D
for traffic forwarded to network 10.0.1.0/24.
Approved standards can describe the proper functioning of routers, routing protocols, connected networks, links,
and the way all of these are advertised to other devices. These actions comprise some of the standards for routing
www.ebook-converter.com
Juniper Networks Router Configuration
Basic configuration of routing protocols in JUNOS takes place in the [edit protocols (protocol)
command hierarchy of the CLI, where (protocol) represents which protocol you wish to configure. Most of the
configuration for the protocols is done in this command hierarchy. An example of a protocol action would be
configuring a protocol to run on an interface. Shown here is a CLI example of the protocols that can be configured
on a Juniper Networks router.
lab@Chicago> configure
Entering configuration mode
[edit]
lab@Chicago# edit protocols
[edit protocols]
lab@Chicago# set ?
Possible completions:
RIP
RIP is one of the oldest IGP protocols used today. RIP has its roots in the U.S. Department of Defense ARPANET
in 1969. There are also components in RIP from early Xerox Network Systems (XNS) and Free BSD (Berkeley
Software Design, Inc.) UNIX routing applications. (More history on RIP can be found at www.ietf.org/rfc.html
RFC 1058.)
There are two RIP versions that are still supported by most routers today: version 1 (RIPv1) and version 2 (RIPv2).
RIPv2 has been standardized by the IETF in RFC 2453. RIPv1 was never completely standardized, and although it
www.ebook-converter.com
is still used in some cases, its use is not recommended owing to its lack of flexibility. However, RIPv1 will be
covered here because it is still supported by Juniper Networks routers.
Theory of Operation
RIP is simple—it is the quick and easy routing protocol. Its simplicity and low processing requirements are two
reasons the implementation of RIP networks persists. RIP uses the Bellman-Ford algorithm (distance vector) to
determine the path to a destination network. When a RIP router learns routes from neighboring routers, it adds
these routes to its routing table and forwards a copy of all of the routes out of RIP-enabled interfaces every 30
seconds. An entry is made up of the destination network and the number of hops to get there. If there are 500
network route entries in the routing table, all 500 entries will be sent out of RIP interfaces every 30 seconds. This
can use considerable network bandwidth as the size of the network grows.
The RIP update consists of the destination prefix and the metric for each known network. When a RIPv1 router has
not had a network route updated from another for 180 seconds, it marks that router's networks as unreachable by
setting the metric to 16. If another 60 seconds pass, and it still has not received a network update for that network,
it will remove the network from the routing table.
Downloader demo watermarks
RIPv1 has two very important limitations. It can only be used in classful route advertisements and has a high metric
limit of 15. The classful route advertisement limitation is significant because it prevents RIPv1 from using CIDR
and VLSMs, which were created to drastically increase network address flexibility. The RIPv1 metric limit of 15
means that this routing protocol can only be used in smaller networks. If the metric for a RIPv1 network is set to
289
8. IGP Routing Protocol Configuration
16, the network is considered unreachable by the router. A metric of 16 is also known as count-to-infinity because
it is beyond what RIP considers reachable.
RIP Metrics
RIP only uses one metric—hop count. A network segment is considered to be the link between two routers. In
Figure 8-5, router A has two different paths that it can use to forward packets toward network 10.10.10.0/24.
When router B advertises 10.10.10.0/24 to router A, it advertises a metric of 1. Adding the directly connected
link between router A and router B, router A sees 10.10.10.0/24 as two hops away, through router B. Router B
also advertises 10.10.10.0/24 to router C as one hop away. Router C adds a hop and advertises
10.10.10.0/24 as two hops away. Router A then adds a hop for the directly connected interface and sees
10.10.10.0/24 as three hops away through router C. Router A compares the two potential paths to the
destination network. The route through router B is entered into the routing table because it has the lowest metric.
Loop Avoidance
www.ebook-converter.com
The nature of distance vector can cause routing loops. In Figure 8-6, you can see a routing loop form. Network
10.10.1.0 is attached to router A. Router A advertises network 10.10.1.0 to router B. Router B then
advertises it to router C. Router C then advertises it to router D. Finally, Router D advertises the network back to
router A.
www.ebook-converter.com
There are other differences between RIPv1 and RIPv2. In RIPv2, the destination address for the updates is
multicast, instead of broadcast, as in RIPv1. This reduces the burden on network devices that do not need to listen
to RIP updates. With broadcast, every device in the broadcast domain must at least open the IP packet and process
the initial information to determine relevance. With multicast addressing, if a device needs that information, it will
listen to that specific address. If it does not need the RIP information, it does not have to process the multicast
address. The multicast address RIPv2 sends to is 224.0.0.9.
Another addition to RIPv2 is authentication. Authentication is used to ensure that routes being distributed
throughout the network are coming from authorized sources.
www.ebook-converter.com
1.
2.
Create a policy that will export routes from the routing table that RIP can advertise.
Add an interface to the RIP process so the interface may be allowed to advertise RIP routes.
In Figure 8-8, two routers will advertise their directly connected networks to each other using RIP.
292
8. IGP Routing Protocol Configuration
[edit]
lab@Chicago# edit policy-options
This enters the policy-options hierarchy.
[edit policy-options]
lab@Chicago# edit policy-statement rip1
This creates a policy-statement named rip1.
[edit policy-options policy-statement rip1]
lab@Chicago# set from protocol direct
This determines a match condition for directly connected routes.
[edit policy-options policy-statement rip1]
lab@Chicago# set then accept
This accepts the routes that meet the match condition.
[edit policy-options policy-statement rip1]
lab@Chicago# up
[edit policy-options]
lab@Chicago# show
<----- shows all configured policy-options
policy-statement rip1 {
from protocol direct;
then accept;
}
www.ebook-converter.com
[edit policy-options]
lab@Chicago#
The second step is to configure a RIP group that will represent all RIP neighbors that can be advertised to in the
same manner. Under the named group, the export policy statement is configured, and the interface through which
RIP will export that policy statement is selected.
[edit]
lab@Chicago# edit protocols rip
[edit protocols rip]
lab@Chicago# edit group boston
This creates group called boston.
[edit protocols rip group boston]
293
8. IGP Routing Protocol Configuration
This tells RIP which interface will send those advertisements.
[edit protocols rip group boston]
lab@Chicago# up
www.ebook-converter.com
+ = Active Route, - = Last Active, * = Both
10.0.0.0/24 *[Direct/0] 07:26:38
• via fe-0/0/2.0
10.0.0.1/32 *[Local/0] 07:26:39
Local
30.30.30.0/24 *[RIP/100] 00:02:59, metric 2
51.0.0.0/24 *[Direct/0] 07:26:38
• via fe-0/0/1.0
51.0.0.1/32 *[Local/0] 07:26:39
Local
224.0.0.9/32 *[RIP/100] 00:03:22, metric 1
lab@Chicago>
On Boston, 10.0.0.0/24 is learned from Chicago, so Boston has added the entry into its routing table.
lab@Boston> show route
inet.0: 8 destinations, 8 routes (7 active, 0 holddown, 1 hidden)
Downloader demo watermarks
+ = Active Route, - = Last Active, * = Both
10.0.0.0/24
30.30.30.0/24
*[RIP/100] 00:03:38, metric 2
*[Direct/0] 07:23:51
• via fe-0/0/1.0
30.30.30.2/32 *[Local/0] 07:23:51
294
8. IGP Routing Protocol Configuration
Local
51.0.0.0/24 *[Direct/0] 07:23:51
• via fe-0/0/0.0
51.0.0.2/32 *[Local/0] 07:23:51
Local
224.0.0.9/32 *[RIP/100] 00:12:27, metric 1
lab@Boston>
RIPv1 and RIPv2 can be run simultaneously. You can use this feature to migrate an existing RIPv1 network to one
running RIPv2. In addition, this allows a Juniper Networks router to communicate and interact with older routers
that might not have the ability to run RIPv2. Configuring the router to send and receive specific versions of RIP can
be done in one of two places:
1. Under the main RIP heading
2. Individually under the group
This allows the grouping of RIPv1 and RIPv2 neighbors. Juniper Networks routers receive both RIPv1 and RIPv2
and send RIPv2 as a default. Below, RIP sending remains RIPv2 by default while RIP receiving has been set for
RIPv2 only:
[edit protocols rip]
lab@Chicago# set receive ?
Possible completions:
both Accept both RIPv1 and RIPv2 packets
none Do not receive RIP packets
version-1 Accept RIPv1 packets only
www.ebook-converter.com
version-2 Accept only RIPv2 packets
[edit protocols rip]
lab@Chicago#
RIP Authentication
Downloader demo watermarks
As stated earlier in this section, RIPv2 allows for authentication. You can use authentication to ensure that routers
or hosts do not inject any routes not configured by the authorized administrators. This assists an administrator in
having the most control over which routers can communicate with each other and what networks they can
advertise.
Juniper Networks routers can use simple text passwords or MD5 authentication. Plain-text passwords are passed
295
8. IGP Routing Protocol Configuration
through the network in simple, readable form, although when the password is typed in plain text in the CLI, it will
appear scrambled when shown in CLI output. MD5, or message digest version 5, passes encrypted keys so
passwords cannot be readily “snooped” on the network. A shared key authenticating the reader, in this case a
router, on the other end is the only way to view the contents of the message.
In the following example, an authentication-type of simple and a password of juniper01 are
configured. Following the configuration code, sample CLI output is also shown, demonstrating that the password
juniper01 has been encrypted by the router.
[edit protocols rip]
lab@Chicago# set authentication-type simple
www.ebook-converter.com
RIP Parameters
RIP has several parameters that can be adjusted to fine tune network configuration: metrics, message-size, and
reserved-field validation for RFC compliance. Metrics are the most important. Administratively manipulating
metrics allows the administrator to pick the path the data will take through the RIP network. Juniper Networks
routers can change the number of routes the update contains to make the updates more efficient. This number can
range from 25 (default) to 255.
The command message-size is used either in the global RIP configuration or can be specified by neighbor
under the group, as shown next:
[edit protocols rip group chicago]
lab@Boston# set neighbor fe-0/0/0 message-size ?
Possible completions:
<message-size> Number of route entries per update message (25..255)
www.ebook-converter.com
administrator to advertise routes differently depending on group.
In Figure 8-9, Chicago has network 192.168.254.0/24, and will advertise it to Boston and Washington D.C. If
Boston and Washington D.C. were in two different groups, Chicago could set the metric-out differently to
affect which way they send traffic. If Chicago keeps the default metrics, Boston and Washington D.C. will use their
directly connected links to forward to 192.168.254.0/24.
lab@Boston>
Chicago has a metric-out added to the Boston group, changing the metric on the received routes from Chicago
by adding three hop counts to each route.
[edit protocols rip]
lab@Chicago# edit group boston
[edit protocols rip group boston]
lab@Chicago# set metric-out 3
www.ebook-converter.com
[edit protocols rip group boston]
lab@Chicago# show
metric-out 3;
export rip1;
neighbor fe-0/0/1.0;
298
8. IGP Routing Protocol Configuration
Local via fe-0/0/1.0
51.0.0.0/24 *[Direct/0] 1d 00:33:42
> via fe-0/0/0.0
[RIP/100] 00:00:06, metric 3
> to 30.30.30.1 via fe-0/0/1.0
51.0.0.2/32 *[Local/0] 1d 00:33:42
Local
192.168.254.0/24 *[RIP/100] 00:00:06, metric 3
> to 30.30.30.1 via fe-0/0/1.0
224.0.0.9/32 *[RIP/100] 00:10:38, metric 1
lab@Boston>
This has been a quick explanation of manipulating RIP metrics in a Juniper Networks router. Be advised that this is
something to be done with care. Doing this incorrectly can cause loops or, at least, suboptimal routing.
www.ebook-converter.com
Local
30.30.30.0/24 *[RIP/100] 00:55:41, metric 2
> to 51.0.0.2 via fe-0/0/1.0
to 10.0.0.2 via fe-0/0/2.0
51.0.0.0/24 *[Direct/0] 17:06:31
> via fe-0/0/1.0
51.0.0.1/32 *[Local/0] 1d 01:20:56
Local
192.168.254.0/24 *[Direct/0] 1d 01:20:56
> via fe-0/0/0.0
192.168.254.1/32 *[Local/0] 1d 01:20:56
Local
224.0.0.9/32 *[RIP/100] 00:52:19, metric 1
RIP neighbor status can be an important piece of information to use in troubleshooting. The following command
output shows the state of the neighbor, the address of the neighboring router's interface, and the version of RIP
allowed to be received. In addition, it also shows if any metric-in values have been assigned.
Neighbor
Source
State Address
Destination
Address
Send
Mode
Receive
Mode
In
Met
-------- ----- ------- ----------- ---- ---- ---
fe-0/0/1.0 Up 51.0.0.1 224.0.0.9 mcast v2 only 1
fe-0/0/2.0 Up 10.0.0.1 224.0.0.9 mcast v2 only 1
299
8. IGP Routing Protocol Configuration
You can also gain insight into the proper functioning of RIP by viewing the statistics. Below is an example of the
statistics that can be of assistance in troubleshooting RIP. An output like the one below is created for each RIP-
enabled interface. Things to look for in the statistics are as follows:
Are there incrementally increasing received updates, and are they of the correct RIP version?
Is authentication in use?
Are there authentication failures?
lab@Chicago> show rip statistics
RIP info: port 520; update interval 30s; holddown 180s; timeout 120s.
rts learned rts held down rqsts dropped resps dropped
1 0 0 0
fe-0/0/1.0: 1 routes learned; 2 routes advertised
Counter Total Last 5 min Last minute
------- ----------- ----------- -----------
Updates Sent 125 11 2
Triggered Updates Sent 1 0 0
Responses Sent 0 0 0
Bad Messages 0 0 0
RIPv1 Updates Received 0 0 0
RIPv1 Bad Route Entries 0 0 0
RIPv1 Updates Ignored 0 0 0
RIPv2 Updates Received 124 11 2
RIPv2 Bad Route Entries 0 0 0
RIPv2 Updates Ignored 0 0 0
Authentication Failures 0 0 0
www.ebook-converter.com
RIP Requests Received 0 0 0
RIP Requests Ignored 0 0 0
..........
lab@Chicago>
RIP is an older distance vector routing protocol that is still in use in many networks. Both versions of RIP are
supported by all Juniper Networks routers. RIPv2 is the more recommended version as it can use CIDR and VLSM
to create more scalable, flexible networks.
OSPF
OSPF is an IGP. The structure for OSPF was first drafted in 1989 by John Moy in RFC 1131, “OSPF
Specification.” This protocol uses an algorithm called the Dijkstra algorithm, after Edsger Dijkstra, the computer
scientist who first described the algorithm to determine which path is best (shortest) between two points. OSPF has
gone through many revisions and updates in the IETF drafts since 1989. OSPF version 2 (OSPFv2) is now IETF
standard 2328, finalized in 1998, also drafted by John Moy.
300
8. IGP Routing Protocol Configuration
searches in an easy-to-read format.
Theory of Operation
OSPF is a link state routing protocol that permits a router to create a topology database of all the other routers and
connections in the network. OSPF is also hierarchical in nature, which means that there is more than one level to its
structure. OSPF is implemented in groupings of routers known as areas. The top-level area is known as area 0, or
the backbone area, so called because, just as information passing through the human central nervous system must
travel through the backbone, any data traveling from one area to another must pass through area 0. Other areas
attach to this backbone area. Figure 8-10 illustrates an OSPF network with four areas. Area 0 is connected to areas
9, 25, and 59. Any traffic from area 25, for example, needing to go to area 9 or 59, will need to go through area 0.
www.ebook-converter.com
OSPF uses active communication between neighbor routers on the same link. When neighbors form a
communications relationship, called an adjacency, they can send advertisements to each other about the state of
the network. The routers have to keep track of the updates they are sending and receiving to ensure that each has
the latest information. The updates that OSPF uses are called LSAs.
OSPF Metrics
OSPF uses the potential bandwidth of each link along a path for its metric. This is commonly referred to as the cost
of the path. These metrics provide more meaningful information than hop count alone because they are not simply
hops added along a path. They include the speed of the link.
The idea behind an OSPF route is that the lower the cost, the more preferred the network. The default formula used
to calculate metrics in OSPF is
cost = 100,000,000 (bps)/link bandwidth (bps)
OSPF Areas
www.ebook-converter.com
The LSDB keeps track of the routers and links in a single area. As the networks grow, however, this topology table
can grow very large. To address this problem, OSPF can be broken into areas, as we mentioned before. The
backbone area and each nonbackbone area will have its own smaller LSDB. Links within each nonbackbone area
will be advertised to area 0.
You can use network summarization to cut down on the number of networks that are advertised from each area into
area 0. Two factors to consider when dividing your OSPF network into areas are the size of the LSDB and the
capability of the routers in that area.
Summarization is the combining of contiguous network advertisements by increasing the scope of the network
mask to cover the networks with fewer statements. In other words, instead of advertising four separate but
contiguous /24 networks, the routers can advertise one /22 network.
In essence, the main purposes of OSPF areas are to reduce the size of the LSDB, to filter advertisements into a
nonbackbone area, and to summarize nonbackbone areas into area 0.
Router Types
Downloader demo watermarks
Notice in Figure 8-12 that some routers have all of their interfaces in the same area, some have interfaces in more
than one area, and some have interfaces that use other protocols, such as RIP. These router types are referred to as
the internal router (IR), the area border router (ABR), and the autonomous system border router (ASBR). The
positions of these routers within the OSPF network are shown in Figure 8-12.
302
8. IGP Routing Protocol Configuration
www.ebook-converter.com
example. Since the RIP routes are outside the OSPF process, RIP routes would be seen as external. The ASBR
router takes the routes from the other routing protocol and imports them into OSPF. There could be more than one
ASBR in an area, some importing routes from another AS, some exporting static routes and some importing RIP
routes. This is done with import and export features explained in detail in Chapter 11.
OSPF Database
The OSPF database is the storage area for the topology of a given area in which the router resides. The databases of
all the routers in a particular area are the same as each router has a complete map of every router and link in the
area. They all have the same picture of the state of the network and the paths to the area destinations. Anytime the
database is updated with new information, all the routers will receive the new information and pass it on to adjacent
routers. The routers within the area must then converge or return to the steady state where all databases are the
same. Once each router in an area receives new information, it must also run the Dijkstra SPF algorithm to update
its own LSDB.
Adjacency
Downloader demo watermarks
Once OSPF is configured on an interface, it begins sending hello packets. These packets are sent to multicast
address 224.0.0.5. A router sends these hello packets so that all other OSPF-enabled routers in an area are
aware of its presence. Even after all OSPF-enabled routers have established communication, hello packets continue
to be sent to inform the adjacent routers that the sending router is still alive.
303
8. IGP Routing Protocol Configuration
A hello packet contains several key pieces of information: router priority, hello interval, router dead interval, a list
of all known neighbors, and subnet mask of the attached network. The router priority number is used in a special
election process, which will be explained later in Section 8.4.9. The hello interval establishes the frequency with
which hello packets will be sent. The router dead interval is the upper limit of time within which a hello packet must
be received from an adjacent router or it will be considered down. The subnet mask, in this instance, is for the
associated interface. Here is how a router forms an OSPF adjacency. It begins when one OSPF-enabled interface
receives a hello packet from another router. Both routers begin exchanging information about their OSPF
implementations to ensure that they are compatible. When a router receives a hello containing its own IP address in
the known-routers group, it knows that the “handshake” between itself and the neighboring router is valid. The
parameters contained in the hello packet for each router will have to match (with the exception of the known-
routers list), before the routers will be allowed to exchange OSPF information.
Sometimes, an OSPF interface does not need to form adjacencies. If this is the case, you can use the passive
interface command to prevent the interface from sending hello packets. Because the interface does not send
hellos, it will not form any adjacencies. This can also be used to ensure that a link is seen as internal, as opposed to
external, by OSPF.
When the routers have agreed on parameters, they begin to exchange OSPF database information. This is known as
the exchange state. The routers will keep track of the information in their database and compare it with that of the
adjacent router's to ensure that they have the same information. When this exchange is complete, the routers will
update all of their neighbors about the new adjacency. The state is now known as full.
LSAs
LSAs are the messages that keep the routers informed about the state of the network. Keeping track of an OSPF
area means keeping track of the different components of that area, such as router identification (RID) numbers,
network summaries, and so on. Because there are many components within an area, there are six different types of
www.ebook-converter.com
LSAs referenced by numbers 1 to 5 and 7. LSA type 6 is a group membership LSA used for a multicast
enhancement to OSPF or Multicast Open Shortest Path First (MOSPF) (to learn more about MOSPF, read
reference RFC 1584 at www.ietf.org).
LSA type 1 represents the router itself. This is how routers tell each other about themselves and the links by which
they are connected.
LSA type 2 is used to describe broadcast and NBMA networks and the routers attached to those networks. This
type of LSA is sent by the Designated Routers (DRs) of those networks (see Section 8.4.9). Figure 8-13 shows that
LSA types 1 and 2 stay within the area.
304
8. IGP Routing Protocol Configuration
LSA type 3 is used for advertising networks or network summaries between different areas within the AS. This LSA
type allows for the number of networks listed for other areas to be reduced and is generated by ABRs.
LSA type 4 is a summary link to an ASBR generated by the ABR to routers within its area. This LSA type will
announce the information about the ASBR for the area. In Figure 8-14, router C is sending a summary of area 25 as
an LSA type 3 and an advertisement for router A as an ASBR in a type 4 LSA.
www.ebook-converter.com
allow type 5 routes. Using a type 7 LSA makes the area a not-so-stubby area (NSSA). The ASBR originates type 7
LSAs. Figure 8-15 shows that as these type 7 LSAs reach the ABR for that area, the ABR changes them to type 5s
to be sent through the rest of the OSPF areas.
www.ebook-converter.com
lab@Chicago>
The following are the names for the LSA types:
Router—type 1
Network—type 2
Summary—type 3
ASBRSum—type 4
Extern—type 5
In the example above, you can also see the RID of the advertising router, as well as the sequence number and age
of the advertisement.
www.ebook-converter.com
OSPF has four basic network types that will determine how adjacencies are formed:
1. Point-to-point
2. Point-to-multipoint
3. Broadcast
4. NBMA
On point-to-point links or point-to-multipoint links, all routers form adjacencies with all other routers on the link in
a mesh style. In broadcast or NBMA network types, non-DR/BDR routers adjacencies are formed with all DRs and
BDRs. In Figure 8-17, adjacencies are formed only with the DR and BDR. In addition, an adjacency is formed
between the DR and BDR. How does a router get to be the DR or BDR? They are elected by all of the routers on
that link.
Router Elections
As you have just learned, certain OSPF network types use a special router type called the DR, which acts as the
leader. All routers on a link hold an election in which they select a DR and a BDR, for redundancy. All other
routers form adjacencies with the DR and BDR. This means that instead of 10 routers needing 45 adjacencies to be
fully meshed, the eight non-DR routers that are not DR or BDR will form adjacencies with the DR and BDR. When
updates need to be sent, the non-DR routers send the updates to the DR and BDR routers, which then send them
back out to all the non-DR routers at once.
How does this election work? OSPF routers constantly send hello packets out of all OSPF-configured interfaces.
The routers all have a priority that is included in the hello packet. The router with the highest priority becomes the
DR, and the router with the second highest on the link becomes the BDR. If their priorities are the same, then the
router with the highest RID becomes the tiebreaker. An OSPF router's RID is represented as an IP address (usually
the highest IP address configured on an interface). On Juniper Networks routers, 128 is the default priority, which is
www.ebook-converter.com
configurable within the range of 0 to 255. If you configure a router to 0 it will never be a DR/BDR. Unless you
adminstratively set the priority value, elections will produce a DR and BDR based solely on the RID, which may
not be ideal.
In Figure 8-18, five routers are on an Ethernet link. Since the routers know this is a broadcast network, a DR and
BDR must be elected following the process just described. All of the routers send their priorities along a broadcast
(Ethernet) network. The router with a priority of 175 wins DR status, while the router with a priority of 150
becomes the BDR. All of the non-DR/BDR routers form an adjacency with the DR and BDR and start sending
LSAs.
Stub Areas
Breaking an AS into areas allows a router's OSPF databases to remain much smaller. If you want to reduce the
database size even further, you can use a special type of OSPF area called a stub area. If there is only one way in
and out of a nonzero area, then there is no need for all the backbone routes, other area routes, or external routes.
The area routers just need a default route to the ABR. Here we will discuss two methods for automatically filtering
routes from outside a nonzero area: stub and totally stubby area and NSSA.
www.ebook-converter.com
Not-So-Stubby Areas
What would happen if, in Figure 8-19, area 25 had been a stub and an external RIP routing process needed to be
advertised to the area? External routes generate type 5 LSAs that are not allowed in stub or totally stubby areas. An
NSSA allows type 7 LSAs through the area, while still retaining other attributes of a stub area. A type 7 LSA is
basically a type 5, but because neither of the stubby area types will allow type 5 LSAs, a type 7 must be used.
When type 7 LSAs hit the ABR of the area, they are changed into normal external type 5 LSAs and permitted to
continue on throughout the OSPF domain. This allows the ASBRs of the stubby area to keep the routes down to a
minimum, but still serve as an entry point for an external routing protocol.
In Figure 8-20, router Chicago (ABR) sends no summary LSAs into area 25, but does send in a default route. This
NSSA differs from stub and totally stubby areas in that external routes (from the RIP network) have to be
propagated. The NSSA configuration allows router Seattle (ASBR) to advertise the RIP networks as type 7 LSAs.
Chicago then converts these to type 5 external LSAs for the rest of the OSPF network. This area is an example of
an NSSA no-summary area. It receives no summaries other than a default from the ABR and has an ASBR
advertising type 7 LSA.
www.ebook-converter.com
Virtual Links
An OSPF nonbackbone area must be connected to area 0, the backbone area. OSPF standards dictate that all traffic
from one nonbackbone area to another must go through the backbone. In addition, area 0 must not be broken into
segments. Since no network is perfectly reliable, there are times when a nonbackbone area could lose its connection
to the backbone, or the backbone itself could be separated into several segments due to an area partition. When this
occurs, a virtual link must be created to form a temporary repair. In Figure 8-21, notice that area 59 is not directly
connected to area 0. Area 59 then needs a virtual link created between router Chicago and router Boston. The
dotted line in the figure represents the virtual link from area 59 to area 0 through area 25. This will allow area 59 to
participate in the OSPF network as if it were directly attached to area 0 with Chicago as the ABR.
www.ebook-converter.com
Figure 8-21. Creating an OSPF Virtual Link
If a failure were to produce a situation in which area 0 was segmented, a virtual link could be created through a
nonbackbone area as shown by the dashed line in Figure 8-22. Router Chicago and router Boston are providing the
backbone connection to area 59 through area 25 since it isn't directly connected to area 0. Chicago acts as an ABR
for area 0 and area 59 as if it were directly connected to area 0. The virtual link is a connection to area 0 that allows
the router to act as an ABR connected to area 0.
www.ebook-converter.com
[edit]
lab@Chicago# edit protocols ospf
[edit protocols ospf]
lab@Chicago# set area 0 interface at-0/1/0.20
[edit protocols ospf]
lab@Chicago# set area 0 interface at-0/1/1.10
[edit protocols ospf]
lab@Chicago# set area 0 interface fe-0/0/0.0
[edit protocols ospf]
lab@Chicago# show
area 0.0.0.0 {
interface at-0/1/0.20;
interface at-0/1/1.10;
Downloader demo watermarks
interface fe-0/0/0.0;
}
[edit protocols ospf]
lab@Chicago#
312
8. IGP Routing Protocol Configuration
Knowing how to add individual interfaces is important when configuring ABRs or ASBRs. They will have
interfaces in different areas. For routers that have all interfaces in OSPF and in the same area, however, the
command set area x interface all will assign every interface into the specified OSPF area.
[edit]
lab@Boston# edit protocols ospf
www.ebook-converter.com
The run show ospf interface brief command shows all OSPF interfaces and their assigned areas. In
addition, it will list the DRs, BDRs, and number of neighbors on those links.
Once router Washington D.C. has had its interfaces entered in OSPF area 0, all routers will have formed
adjacencies and advertised routes.
lab@Wash-DC> show route
inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
314
8. IGP Routing Protocol Configuration
Router Washington D.C. is now an internal router. For routers Chicago and Boston, each interface must be
configured for the appropriate area.
[edit]
lab@Chicago# edit protocols ospf
[edit protocols ospf]
lab@Chicago# set area 0 interface at-0/1/1.10
[edit protocols ospf]
lab@Chicago# set area 25 interface fe-0/0/0.0
----
[edit]
lab@Boston# edit protocols ospf
[edit protocols ospf]
lab@Boston# set area 0 interface at-2/2/1.10
[edit protocols ospf]
lab@Boston# set area 59 interface at-2/2/0.10
[edit protocols ospf]
lab@Boston#
Routers Chicago and Boston now need separate OSPF databases for each area in which they have interfaces
configured. Taking a look at router Chicago's database in the following example. Notice that the LSAs are grouped
www.ebook-converter.com
by type and by area in ascending order.
lab@Chicago> show ospf database
OSPF link state database, area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.0.10.1 10.0.10.1 0x80000002 250 0x2 0x8b65 48
Router 10.200.0.1 10.200.0.1 0x80000002 248 0x2 0x969c 48
Summary *10.0.10.0 10.0.10.1 0x80000002 374 0x2 0xdb56 28
Summary *10.0.20.0 10.0.10.1 0x80000001 374 0x2 0x79ae 28
Summary *10.40.0.0 10.0.10.1 0x80000001 374 0x2 0x749f 28
Summary *10.50.0.0 10.0.10.1 0x80000001 374 0x2 0xfb0e 28
Summary *10.60.0.0 10.0.10.1 0x80000001 374 0x2 0x837c 28
Summary 10.200.0.0 10.200.0.1 0x80000001 249 0x2 0xe2d2 28
OSPF link state database, area 0.0.0.25
Type ID Adv Rtr Seq Age Opt Cksum Len
315
8. IGP Routing Protocol Configuration
Ultimately, the routes will be in the routing table. Showing the routes on Boston also shows all the routes from
Washington D.C.
lab@Boston> show route
inet.0: 12 destinations, 12 routes (11 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
. . . cut
10.0.30.0/24 *[Direct/0] 1d 00:16:21
> via at-2/2/1.10
[OSPF/10] 00:11:00, metric 1
> via at-2/2/1.10
10.0.30.1/32 *[Local/0] 1d 00:16:21
Local
10.40.0.0/24 *[OSPF/10] 00:10:55, metric 3
> via at-2/2/1.10
10.50.0.0/24 *[OSPF/10] 00:10:55, metric 3
> via at-2/2/1.10
10.60.0.0/24 *[OSPF/10] 00:10:55, metric 3
> via at-2/2/1.10
10.200.0.0/24 *[Direct/0] 00:31:19
> via at-2/2/0.10
[OSPF/10] 00:11:00, metric 1
> via at-2/2/0.10
10.200.0.1/32 *[Local/0] 1d 00:16:21
Local . . . . cut
www.ebook-converter.com
Also, notice the metric costs for the routes from router Boston to the far side of router Washington D.C. The metric
is three, even though the path is 155Mbps ATM through two 100Mbps Fast Ethernet links. Remember, in Section
8.1.1 we discussed reference bandwidths as they relate to the metric (cost).
Changing the reference bandwidth to 1,000Mbps (1Gbps) will show a more accurate cost for the path. The
reference bandwidth should be at least equal to your fastest network link in OSPF. After changing the reference
bandwidth of all the routers, the metrics will have changed.
[edit protocols ospf]
lab@Wash-DC# set reference-bandwidth 1000000000
(commit)
lab@Boston> show route
inet.0: 12 destinations, 12 routes (11 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 10.0.10.1 10.0.10.1 0x80000006 848 0x2 0x7b73 36
Router *10.0.20.1 10.0.20.1 0x80000005 1671 0x2 0x3868 84
Network *10.0.10.2 10.0.20.1 0x80000001 2574 0x2 0x935d 32
Summary 10.0.30.0 10.0.10.1 0x80000004 520 0x2 0x2de9 28
Summary 10.200.0.0 10.0.10.1 0x80000004 220 0x2 0x4b1b 28
To change area 25 to a stub network, the configuration must be applied to all the internal routers and ABRs for that
particular area. The following example shows the no-summaries option, which will filter out type 3, 4, and 5
LSAs, creating a totally stubby area. If type 3s are to be received and only type 4s and 5s to be filtered, then the
no-summaries option is configured.
Router Chicago
[edit protocols ospf]
lab@Chicago# set area 25 stub no-summaries
Router Washington D.C.
Downloader demo watermarks
[edit protocols ospf]
lab@Wash-DC# set area 25 stub no-summaries
lab@Wash-DC> show ospf database
OSPF link state database, area 0.0.0.25
317
8. IGP Routing Protocol Configuration
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 10.0.10.1 10.0.10.1 0x80000003 5 0x0 0x955f 36
Router *10.0.20.1 10.0.20.1 0x80000002 2 0x0 0x5254 84
Network 10.0.10.1 10.0.10.1 0x80000001 5 0x0 0x2ad3 32
lab@Wash-DC>
The summary LSAs have been filtered. This is an extremely important feature to use for areas that do not need to
know all of the routes. If areas have thousands of routes and there are many areas, the routing engine could be
overworked. The stub and totally stubby configuration must be applied to every router in the area to be effective.
One final configuration step that must be taken on Washington D.C. because it has been cut off from all route
advertisements, is to add a default route to the ABR. With no knowledge of any router outside of area 25,
Washington D.C. must have a way to get to routers external to the area. Router Washington D.C. cannot get to
router Boston, as shown below when router Washington D.C. tries to ping Boston:
lab@Wash-DC> ping 10.0.30.1
PING 10.0.30.1 (10.0.30.1): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- 10.0.30.1 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
To have the ABR advertise a default route into an area, use the default-metric parameter of the area stub
command on the ABR. For this scenario, Chicago is the ABR for area 25.
www.ebook-converter.com
Configuration for router Chicago:
[edit protocols ospf]
lab@Chicago# set area 25 stub default-metric 2
Configuration for router Washington D.C.:
lab@Wash-DC> show route
inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[OSPF/10] 00:00:06, metric 3
> to 10.0.10.1 via fe-0/0/0.0
10.0.10.0/24 *[Direct/0] 1d 22:54:50
> via fe-0/0/0.0
10.0.10.2/32 *[Local/0] 1d 22:54:50
Local . . .cut
Downloader demo watermarks
Router Washington D.C. now has a default route that covers anything not known to the area. Washington D.C. can
now ping Boston.
lab @Wash-DC> ping 10.0.30.1
PING 10.0.30.1 (10.0.30.1): 56 data bytes
318
8. IGP Routing Protocol Configuration
64 bytes from 10.0.30.1: icmp_seq=0 ttl=254 time=1.478 ms
64 bytes from 10.0.30.1: icmp_seq=1 ttl=254 time=1.372 ms
64 bytes from 10.0.30.1: icmp_seq=2 ttl=254 time=1.329 ms
64 bytes from 10.0.30.1: icmp_seq=3 ttl=254 time=1.271 ms
^C
--- 10.0.30.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.271/1.363/1.478/0.076 ms
lab @Wash-DC>
www.ebook-converter.com
Figure 8-25. OSPF NSSA Configuration
Before an NSSA area is configured, the database has many different types of LSAs in router Washington D.C., as
follows:
lab@Wash-DC> show ospf database
OSPF link state database, area 0.0.0.25
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 10.0.10.1 10.0.10.1 0x80000004 260 0x2 0x7f71 36
(commmit)
[edit protocols ospf]
lab@Wash-DC# run show ospf database
www.ebook-converter.com
Router *10.0.20.1 10.0.20.1 0x80000002 10 0x0 0xeee2 84
Network 10.0.10.1 10.0.10.1 0x80000001 14 0x0 0x2ad3 32
Summary 0.0.0.0 10.0.10.1 0x80000001 110 0x0 0xf651 28
NSSA *10.220.0.0 10.0.20.1 0x80000001 14 0x8 0x2481 36
NSSA *10.221.0.0 10.0.20.1 0x80000001 14 0x8 0x188c 36
NSSA *10.222.0.0 10.0.20.1 0x80000001 14 0x8 0xc97 36
[edit protocols ospf]
lab@Wash-DC#
Note
In the configuration example shown here, the show ospf database command was run from the
configuration mode. This can actually be quite preferrable during configuration. The run option in
configuration mode can save you the work of going in and out of configuration mode.
Router Washington D.C. sees only the necessary LSAs. The NSSA in the first column represents the type 7 LSA.
www.ebook-converter.com
Extern
Extern
10.221.0.0
10.222.0.0
10.0.20.1
10.0.20.1
0x80000003
0x80000002
923
366
0x2
0x2
0x9c0 36
0xfeca 36
lab@Chicago>
This is the final configuration for router Chicago and router Washington D.C. (export policies are explained in
detail in Chapter 11).
[edit]
lab@Chicago# show
cut . .
}
}
protocols {
ospf {
reference-bandwidth 1g;
area 0.0.0.25 {
[edit]
lab@Wash-DC#
cut . . .
}
}
routing-options {
static {
route 10.220.0.0/24 next-hop 10.0.20.2;
route 10.221.0.0/24 next-hop 10.0.20.2;
route 10.222.0.0/24 next-hop 10.0.20.2;
}
}
protocols {
ospf {
export ospf_stat;
reference-bandwidth 1g;
area 0.0.0.25 {
nssa no-summaries;
interface all;
www.ebook-converter.com
}
}
}
policy-options {
policy-statement ospf_stat {
from protocol static;
then accept;
}
}
[edit]
lab@Wash-DC#
322
8. IGP Routing Protocol Configuration
www.ebook-converter.com
}
interface fe-0/0/0.0;
area 0.0.0.0 {
virtual-link neighbor-id 10.0.10.1 transit-area 0.0.0.25;
interface fe-0/0/1.0;
}
[edit protocols ospf]
lab@Wash-DC#
[edit protocols ospf]
lab@Chicago# set area 0 virtual-link neighbor-id 10.0.20.1 transit-area 25
[edit protocols ospf]
lab@Chicago# show
reference-bandwidth 1g;
area 0.0.0.25 {
interface fe-0/0/0.0;
323
8. IGP Routing Protocol Configuration
The best way to ensure that the virtual link is up is to use the show ospf interface command as shown
below. This will show the status of the virtual link and neighbor on the far end. If the neighbor ID is set incorrectly,
then the status will be down for that link.
lab@Chicago> show ospf interface
Interface State Area DR ID BDR ID Nbrs
at-0/1/1.10 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
vl-10.0.20.1 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
fe-0/0/0.0 BDR 0.0.0.25 10.0.20.1 10.0.10.1 1
lab@Chicago>
Router Chicago now has an interface in area 0 with one neighbor. Notice the interface is assigned as a vl for
virtual link. Router Chicago can now participate as an ABR connected to area 0.
www.ebook-converter.com
www.ebook-converter.com
[edit protocols ospf area 0.0.0.0]
lab@Chicago# edit interface at-0/1/1.10
[edit protocols ospf area 0.0.0.0 interface at-0/1/1.10]
lab@Chicago# set authentication-key password1 key-id 1
325
8. IGP Routing Protocol Configuration
lab@Chicago>
After a matching configuration is committed on router Boston, the neighbor relationship is established:
[edit protocols ospf area 0.0.0.0]
lab@Boston# show
authentication-type md5;
interface at-2/2/1.10 {
authentication-key “$9$V/bgJGUHm5FjHBEyKx7jHq.PQFn/” key-id 1;
}
area-range
www.ebook-converter.com
The area-range command allows the summarization of an area at an ABR. This is key to reducing the volume of
network statements that must be passed between areas. In Figure 8-28, area 25 has four contiguous /24 networks
that can be summarized into one /22 network advertisement by ABR router Chicago to area 0. This will cut the
number of advertisements from area 25 into area 0 down significantly.
326
8. IGP Routing Protocol Configuration
First, observe the current routing table on router Boston before the summarization is configured:
lab@Boston> show route
inet.0: 10 destinations, 10 routes (9 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
all four networks of the area. This command is applied from the area that is to be summarized.
[edit protocols ospf area 0.0.0.25]
lab@Chicago# set area-range 10.0.8.0/22
Now, looking at router Boston's routing table, we see the more specific routes behind router Chicago have been
grouped into the 10.0.8.0/22.
lab@Boston> show route
inet.0: 7 destinations, 7 routes (6 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
lab@Boston>
Changing Cost
Each interface in OSPF has a metric cost associated with it. This is what is added at each hop of an advertised
route. If you do not desire the least-cost path to be used as the primary forwarding path, cost can be added to the
interface to make it less preferred. This would be analogous to adding hops in RIP. In both cases, the metric on the
best route is being increased, forcing the other routers to adopt another path. In Figure 8-29, router Boston has a
route to 10.100.0.0/24 directly through router Chicago because that path has the lowest cost with a metric of
12.
www.ebook-converter.com
Figure 8-29. OSPF Metric Costs
The cost to 10.100.0.0/24 is 6—the cost of the originating interface, plus 6 added for the directly connected
link with Boston. With the reference bandwidth set at 1Gbps, Fast Ethernet has a cost of 10, and 155Mbps ATM
has a cost of 6.
lab@Boston> show route
inet.0: 9 destinations, 9 routes (8 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.10.0/24 *[OSPF/10] 00:03:16, metric 16
> via at-2/2/1.10
10.0.20.0/24 *[Direct/0] 00:41:22
> via fe-2/0/0.0
10.0.20.2/32 *[Local/0] 5d 23:57:51
Local
www.ebook-converter.com
10.0.20.2/32
> via fe-2/0/0.0
*[Local/0] 5d 23:48:46
Local
10.0.30.0/24 *[Direct/0] 5d 23:48:46
> via at-2/2/1.10
[OSPF/10] 00:01:14, metric 21
> via at-2/2/1.10
10.0.30.1/32 *[Local/0] 5d 23:48:46
Local
10.100.0.0/24 *[OSPF/10] 00:01:14, metric 26
> to 10.0.20.1 via fe-2/0/0.0
10.200.0.1/32 *[Local/0] 5d 23:48:46
Reject
224.0.0.5/32 *[OSPF/10] 00:31:58, metric 1
lab@Boston>
www.ebook-converter.com
}
lab@Wash-DC>
After checking the interfaces, the next step is to check for OSPF neighbors using the show ospf neighbors
command. This command also has a brief and detailed option. It shows the address of the neighbors and
associated interfaces, the state of the OSPF adjacency, and the RID. Also included in the output is the priority of
that interface and the dead time before the neighbor is considered down.
lab@Wash-DC> show ospf neighbor brief
Address Interface State ID Pri Dead
10.0.10.1 fe-0/0/0.0 Full 10.0.10.1 128 36
lab@Wash-DC> show ospf neighbor detail
Address Interface State ID Pri Dead
10.0.10.1 fe-0/0/0.0 Full 10.0.10.1 128 31
area 0.0.0.25, opt 0x40, DR 10.0.10.2, BDR 10.0.10.1
Up 00:32:26, adjacent 00:32:26
lab@Wash-DC>
www.ebook-converter.com
If the interface is configured correctly, and the neighbors are in a full state, you can also check the OSPF database.
This should have the appropriate store of LSAs. You will want to verify that all of the area internal routers and
network links are there.
lab@Wash-DC> show ospf database
OSPF link state database, area 0.0.0.25
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 10.0.10.1 10.0.10.1 0x80000008 237 0x0 0x9b51 36
Router *10.0.10.2 10.0.10.2 0x8000000a 582 0x0 0x931d 48
Network *10.0.10.2 10.0.10.2 0x80000005 595 0x0 0x9967 32
NSSA *10.220.0.0 10.0.10.2 0x80000005 582 0x8 0xe7cb 36
NSSA *10.221.0.0 10.0.10.2 0x80000005 582 0x8 0xdbd6 36
NSSA *10.222.0.0 10.0.10.2 0x80000005 582 0x8 0xcfe1 36
lab@Wash-DC>
331
8. IGP Routing Protocol Configuration
can be summarized by one network statement.
Quite often, network implementations and IP addressing schemes are not ideal, which can lead to larger LSDBs and
routing tables. There are features of OSPF that can ease the burden of maintaining routing tables. The idea is to
have an LSDB that is as small as possible, but still maintains optimal routing. Use not just area-ranges into the core,
but also the stub configuration to filter type 5 external advertisements.
Create areas wisely. All routers in an area must have a full database of all routers and networks in the area. It
makes sense to create more areas if maintaining the database in a given area becomes taxing. If they are properly
addressed to keep routing table sizes down, having more areas can be efficient. Bear in mind that a robust backbone
is necessary to handle links for increased interarea traffic.
IS-IS
IS-IS, or Intermediate System to Intermediate System, is a hierarchical link IGP similar in function to OSPF. IS-IS is
rooted in the DECnet Phase V routing protocol designed by Radia Perlman around 1985 and standardized by the
International Standards Organization (ISO) in 1988. The ISO had implemented IS-IS for use with Connectionless
Network Protocol (CLNP), but IS-IS could be extended for use with any Layer 3 protocol. CLNP specified IS-IS
and End System to Intermediate System (ES-IS) communications parameters. End systems are devices that send
and receive data, such as PCs. Intermediate systems are those that primarily forward data (but can send and receive
data as required), such as routers. IS-IS defines the communications parameters between intermediate system
devices.
IS-IS was then extended to cover IP routing in addition to CLNP. This extended protocol is sometimes known as
Integrated IS-IS or Dual IS-IS. RFC 1195 (December 1990) is the proposed IETF standard. Since 1990, many
implementations of IS-IS have added features that have gone above and beyond the proposed standard. Three
common practice, or informational, RFCs were drafted in 2000. These newer IS-IS RFCs are 2763, 2966, and 2973.
www.ebook-converter.com
Another version of IS-IS was developed for the Internetwork Packet Exchange (IPX) protocoland was named
NetWare Link State Routing Protocol (NLSP) (although NLSP and IS-IS are not compatible). So, as you can see,
the IS-IS design is flexible enough to be used with many Layer 3 protocols, but IP is the protocol we are concerned
with in this book.
IS-IS Overview
How does a routing protocol that was designed originally for CLNP differ from OSPF, which is designed
specifically for IP? There are the following differences:
IS-IS has a DR, but not a BDR, and its DR is preemptive.
The IS-IS election priority range is 0 through 127 (with a default of 64 on Juniper Networks routers), while the
range for OSPF is 0 through 255 (with a default of 128).
OSPF runs on IP, while IS-IS specifies a Layer 2 encapsulation
332
8. IGP Routing Protocol Configuration
A link state topology database of a particular area
Dijkstra algorithm for finding the shortest path
Cost-based metric (bandwidth)
Neighboring routers that establish adjacencies
OSPF LSA-like link state PDU (LSPs)
The use of a DR (or Designated IS) on multiaccess links
If you recall, OSPF had a backbone area called area 0, with all other areas attached to it. IS-IS also has multiple
areas, called Level 1 areas and Level 2 areas, with Level 2 areas representing the backbone and having the same
function as area 0 in OSPF. Figure 8-30 shows several Level 1 areas connected through Level 1/2 (L1/2) routers to
a Level 2 area.
www.ebook-converter.com
Figure 8-30. IS-IS Areas
The L1/L2 routers have the same function as ABRs in OSPF. They filter unnecessary advertisements into a Level 1
area and can summarize network advertisements out of a Level 1 area.
In IS-IS and OSPF each router has an RID used for election purposes (DR configured priority, notwithstanding) and
for identification in the link state topology database. Because of the origin of IS-IS, a CLNP-type address is used
instead of an IP address to identify the router to other routers. Unlike OSPF, which will use an IP address, this
CNLP address must be configured manually on the loopback, and all interfaces that will participate in IS-IS must be
configured to use the loopback address.
Going back to the interface configuration in Chapter 7, the family iso command is used when IS-IS is the IP
routing protocol of choice. The ISO address is placed on the loopback interface. All other interfaces that need to
run IS-IS have family iso added to their configuration.
IS-IS also uses a cost metric and can be configured in the same way as OSPF, but the default metric behavior is
Downloader demo watermarks
slightly different. IS-IS gives all links a default metric of 10 and uses no reference bandwidth until it is configured to
do so. It would be wise to set a reference bandwidth, just as in OSPF.
Note
For L1 routers to form adjacencies, they must have a common area field. The LSP identifies them as
being intra-area. L2 routers can have different area identifiers.
There are two other NET types that are more complicated and have more than three parts. These addresses can be
www.ebook-converter.com
as many as 20 bytes in length. These are the ISO NSAP and Government Open Systems Interconnection Profile
(GOSIP). The ISO NSAP is 14 bytes in length and has an additional field—the domain field—as compared to the
simple NET. Figure 8-32 illustrates an ISO NSAP. It the same as the simple NET with an extra six bytes on the
front.
334
8. IGP Routing Protocol Configuration
Figure 8-33. IS-IS GOSIP Address
The abbreviations for the field names in Figure 8-33 are defined as follows
AFI—Authority and format identifier
IDI—International domain identifier
DFI—Domain specific part (DSP) format identifier
AA—Administrative authority
Rsvd—Reserved
RDI—Routing domain identifier
Area—Area ID
System ID—Individual RID
Sel—Selector bit
Notice that the end part of the addressing scheme is the same as in the earlier addressing schemes. In some texts,
the IDI is also called an ICD, or international code designator. A detailed explanation of the usage of these fields is
beyond the scope of this book. Instead, see RFC 1237 “Guidelines for OSI NSAP Allocation in the Internet,” at
www.ietf.org/rfc.html.
DRs
www.ebook-converter.com
IS-IS elections are very similar to OSPF elections. When an interface is configured for IS-IS, it immediately starts
sending out hellos. The priority is checked, and the router with the highest priority becomes the DR. One difference
from OSPF is that in IS-IS the DR will change when a higher-priority router is configured onto the link. This
behavior is called preemptive, because a higher priority router can preempt the status quo. This is important to
know if a router with a high priority is to be added to a multiaccess link with many routers. Routing processes could
be interrupted as all of the adjacencies drop from the old DR and are set up with the new DR.
IS-IS PDUs
IS-IS uses three main PDUs to exchange information. These PDU types are hello, link state, and sequence number
packets (SNPs). The hello PDU serves the same function as it does in OSPF. The packet is sent out of IS-IS-enabled
interfaces to find neighbors. Once neighbors are found, adjacencies can be formed. After an adjacency is
established, the hellos continue to inform the adjacent routers that the sending router is still up. There are three
types of hello PDUs that IS-IS routers use: L1 broadcast network, L2 broadcast network, and any point-to-point
network.
335
8. IGP Routing Protocol Configuration
SNPs are used to ensure that all the routers on a link have the same information. They are used in a similar manner
as acknowledgments. There are four types of SNPs: Level 1 and Level 2 can each send a partial SNP (PSNP) or a
complete SNP (CSNP). A PSNP is similar to an acknowledgment and lists the sequence numbers of the most recent
LSPs; however, a PSNP can acknowledge more than one LSP at a time. PSNPs can also request missing LSPs on a
multiaccess link. A CSNP contains the latest sequence numbers of all of the LSPs in the database and is used to
synchronize the client router's database to the DR's database.
www.ebook-converter.com
This is known as route leaking.
If only default routes are used to forward traffic out of an L1 area, suboptimal routing can occur when an L1 area
has more than one L1/L2 router. Figure 8-34 shows router Chicago in an L1 area. Routers Boston and New York
are the L1/L2 routers for Chicago's area. They will both advertise an attached bits area 11. If router Chicago has a
better metric to router Boston than New York for the default route, then all of the out-of-area traffic will pass
through Boston, even the traffic destined for network 192.168.10.0/24.
www.ebook-converter.com
Figure 8-35. IS-IS Single-Area Configuration
For the configuration of the system ID portion of the NET, Washington D.C. and Chicago will use the last two
bytes of the fe-0/0/0.0 interface IP address. Boston will use the last two bytes of the fe-2/0/0 IP address.
Remember that these values in the address field are hexadecimal.
Router Chicago:
[edit interfaces lo0]
lab@Chicago# set unit 0 family iso address 10.0000.0010.0001.00
[edit interfaces lo0]
lab@Chicago# show
Downloader demo watermarks
unit 0 {
family iso {
address 10.0000.0010.0001.00;
}
}
337
8. IGP Routing Protocol Configuration
[edit interfaces lo0]
lab@Chicago#
Router Washington D.C.:
[edit interfaces lo0 unit 0]
lab@Wash-DC# set family iso address 10.0000.0010.0002.00
Router Boston:
[edit interfaces lo0 unit 0]
lab@Boston# set family iso address 10.0000.0020.0002.00
The next step is to add the family iso command to the interfaces that will be included in the IS-IS protocol.
[edit interfaces]
lab@Chicago# set fe-0/0/0 unit 0 family iso
[edit interfaces]
lab@Chicago# set at-0/1/0 unit 20 family iso
[edit interfaces]
lab@Chicago# set at-0/1/1 unit 10 family iso
[edit interfaces]
lab@Chicago# show
. . .cut
www.ebook-converter.com
}
at-0/1/0 {
atm-options {
vpi 0 maximum-vcs 250;
}
unit 20 {
vci 100;
family inet {
address 10.100.0.1/24;
}
family iso;
}
}at-0/1/1 {
atm-options {
vpi 0 maximum-vcs 250;
}
unit 10 {
vci 200;
Downloader demo watermarks
family inet {
}
address 10.0.30.2/24;
family iso;
}
}cut . .
338
8. IGP Routing Protocol Configuration
Finally, you need to configure the interfaces in the routing protocol. Just as in OSPF, if all interfaces will be in the
same area, then the set interface all command can be used. When an IS-IS level is not specified for an
interface, an L1/L2 is set up by default. To keep only Level 1 on the interfaces, you can disable L2 routing. In
addition, the loopback 0 (lo0) interface must be added to ensure that the interface that the NET is configured on is
in IS-IS.
[edit protocols]
lab@Chicago# set isis interface all level 2 disable
[edit protocols]
lab@Chicago# show
isis {
interface all;
}
[edit protocols isis]
lab@Wash-DC# set interface lo0 level 2 disable
[edit protocols isis]
lab@Wash-DC# set interface fe-0/0/0 level 2 disable
[edit protocols isis]
lab@Wash-DC# set interface fe-0/0/1 level 2 disable
[edit protocols isis]
lab@Wash-DC# set reference-bandwidth 1g
[edit protocols isis]
www.ebook-converter.com
lab@Wash-DC# show
reference-bandwidth 1g;
interface fe-0/0/0.0 {
level 2 disable;
}
interface fe-0/0/1.0 {
level 2 disable;
}
interface lo0.0 {
level 2 disable;
}
[edit protocols isis]
lab@Wash-DC#
Now all three routers should have NETs, should have family iso assigned to the interfaces, and should have all
interfaces, including the loopback, in IS-IS with Level 2 information disabled. To see on which interfaces IS-IS is
lab@Wash-DC>
The contents and state of the LSP database for IS-IS can be shown with the show isis database command.
As in OSPF, the sequence number of the LSP is shown. Unlike OSPF, instead of the Age of the advertisement, the
Lifetime, or amount of time left to the LSP, is shown.
lab@Wash-DC> show isis database
IS-IS level 1 link-state database:
LSP ID Sequence Checksum Lifetime Attributes
Chicago.00-00 0x7 0xbbb 515 L1
Chicago.02-00 0x3 0x95c4 487 L1
Wash-DC.00-00 0x7 0xef53 648 L1
www.ebook-converter.com
Wash-DC.03-00 0x4 0xd85c 648 L1
Boston.00-00 0x4 0x1003 552 L1
0100.0010.0001.00-00 0x4 0 0 L1
0100.0010.0001.02-00 0x1 0 0 L1
0100.0010.0002.00-00 0x6 0 0 L1
0100.0010.0002.03-00 0x1 0 0 L1
0100.0010.0003.00-00 0x7 0 0 L1
10 LSPs
IS-IS level 2 link-state database:
LSP ID Sequence Checksum Lifetime Attributes
Wash-DC.00-00 0x8 0x28e5 648 L1 L2
0100.0010.0002.00-00 0x7 0 0 L1 L2
2 LSPs
lab@Wash-DC>
As previously mentioned, the actions, commands, and functions of OSPF and IS-IS are very similar, since they are
both Link State Protocols (LSPs).
Downloader demo watermarks
IS-IS Multiple-Area Configuration
In the single-area scenario, Level 2 routing is disabled on all interfaces to create a single Level 1 area. To create a
Level 2 area and connect Level 1 areas, L1/L2 routers have to be created. In a large Level 2 area, L2-only routers
340
8. IGP Routing Protocol Configuration
would be configured. In Figure 8-36, an L2 area connects L1 area 25 and area 59.
www.ebook-converter.com
[edit protocols isis]
lab@Wash-DC# set reference-bandwidth 1g
Router Chicago is an L1/L2 router. After configuring the lo0 interface, the interfaces have to be added to different
levels. Be sure to add the loopback to IS-IS.
[edit protocols isis]
lab@Chicago# set interface fe-0/0/0 level 2 disable
www.ebook-converter.com
10.0.30.2/32 *[Local/0] 1w2d 02:19:24
Local
10.100.0.0/24 *[Direct/0] 1w1d 02:38:17
> via at-0/1/0.20
10.100.0.1/32 *[Local/0] 1w2d 02:19:24
Local
10.150.0.0/24 *[Static/5] 3d 01:50:25
> to 10.100.0.2 via at-0/1/0.20
10.200.0.0/24 *[IS-IS/18] 00:26:58, metric 12, tag 2
> to 10.0.30.1 via at-0/1/1.10
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0000.0010.0001.00/64
*[Direct/0] 00:35:33
> via lo0.0
342
8. IGP Routing Protocol Configuration
lab@Wash-DC> show route
10.0000.0010.0002.00/64
*[Direct/0] 00:41:00
> via lo0.0
lab@Wash-DC>
www.ebook-converter.com
the entire IS-IS routing protocol and any router wishing to form an adjacency. Hello authentication is configured
between two particular routers at the interface level.
Global IS-IS authentication for IS-IS adjacency is very similar to OSPF. The difference in configuration is that in
OSPF under the [edit protocols ospf (area)] directory, the authentication type is defined and then the
key is defined under the [edit protocols ospf area (interface)] directory. In IS-IS, the
configuration for the authentication type and the key configuration can take place globally [edit protocols
isis], under the level [edit protocols isis level #], or under an interface [edit protocols
isis interface (interface)].
Under the directory [edit protocols isis interface (interface)], the authentication-type
and authentication-key are used for validation of hello packets. In Figure 8-37, Level 2 will have global
authentication configured, while hello authentication will be configured between the Level 1 routers of area 25. The
global L2 authentication will require any router that wishes an L2 adjacency with Boston to be configured in the
same way.
www.ebook-converter.com
reference-bandwidth 1g;
level 2 {
authentication-key “$9$f5nCOBEyeWRhdbY2aJn/9”; # SECRET-DATA
authentication-type md5;
}
interface at-2/2/0.10 {
level 2 disable;
}
interface at-2/2/1.10 {
level 1 disable;
}
interface lo0.0;
www.ebook-converter.com
How can you tell that authentication is working? With global IS-IS authentication configuration, if any routers
wishing to form an adjacency are not properly configured, the adjacency will not form. This differs from hello
authentication, which is done between specific neighbors. Look at the adjacencies for router Chicago. Routers
Boston and Chicago have had authentication configured, but router Washington D.C. has not. Notice the rejection
of adjacency to Washington D.C.
[edit protocols isis]
lab@Chicago# run show isis adjacency
IS-IS adjacency database:
Interface System L State Hold (secs) SNPA
at-0/1/1.10 Boston 2 Up 22
fe-0/0/0.0 Wash-DC 1 Rejected 11 0:90:69:9e:80:0
345
8. IGP Routing Protocol Configuration
[edit protocols isis interface fe-0/0/0.0]
lab@Wash-DC# set hello-authentication-key 123test
www.ebook-converter.com
lab@Wash-DC> show isis interface
IS-IS interface database:
Interface L CirID Level 1 DR Level 2 DR L1/L2 Metric
fe-0/0/0.0 1 0x2 Chicago.02 Disabled 10/10
fe-0/0/1.0 1 0x3 Wash-DC.03 Disabled 10/10
lo0.0 0 0x1 Passive Disabled 0/0
lab@Wash-DC>
Checking the adjacency states will provide information on the relationship with adjoining routers. This includes to
which interface the adjacent router is connected, which the adjacent router is, what the state of the relationship is
currently, and how long it has been up.
lab@Chicago> show isis adjacency
IS-IS adjacency database:
Interface System L State Hold (secs) SNPA
at-0/1/1.10 Boston 2 Up 22
fe-0/0/0.0 Wash-DC 1 Rejected 11 0:90:69:9e:80:0
Downloader demo watermarks
lab@Chicago>
Looking at the contents of the LSDB can assist in ensuring that all the devices that are supposed to be in the area
are in fact in the database. Are all of the routers and links listed? Are there supposed to be summaries in the
database or just a default route? Checking the routing table is most important. The whole purpose of using and
346
8. IGP Routing Protocol Configuration
tuning routing protocols is to ensure that the next-hop is what you expect it to be. This will ensure that the routers
have the proper information to make an informed decision for packet forwarding.
Chapter Summary
Routing protocols help make up the map that allows the Internet to exist by telling each other about the networks
they know of, where they are, and how far away. These pieces of information allow a router to make a forwarding
decision for a particular destination. There are two major groups of protocols: those that communicate between
different administrative entities (called EGPs), and those that operate within an administrative entity (IGPs). IGPs
are routing protocols that service networks under the control of one administrative entity. IGPs can be either
distance vector, based on hop count, or link state, based on a complete picture of routers and links for a given area.
RIP is a type of distance vector protocol and has many limitations. OSPF and IS-IS are both LSPs that use a
database to keep track of routers, links, and networks in an area. Both of these link state networks can be broken
down into multiple areas that connect to a backbone through which all traffic to another area must pass.
With careful planning and proper feature implementation, the Juniper Networks router can create a high-speed,
fault-tolerant, scalable network for the internal administrative entity.
Bibliography
www.ebook-converter.com
www.ebook-converter.com
[ch08bib10] Tom Thomas,. OSPF Network Design Solutions. Cisco Press,
<year>1998</year>.
[ch08bib11] www.juniper.net
BGP Overview
EGPs, in a nutshell, provide the information necessary for interdomain routing. More specifically, they provide
network layer reachability information (NLRI), which is used to determine the best paths through multiple ASs.
As discussed in Section 8.1, IGP provides the best route information within an AS. This chapter will focus on a
larger scale.
BGP4 is the implemented standard across the Internet and is in the EGP family. Figure 9-1 shows an overview
www.ebook-converter.com
of the relationship of BGP and a given IGP to the Internet. BGP provides NLRI between any two or more ASs.
Furthermore, any AS can use a different IGP to accomplish intradomain routing. Although not listed in the
figure, there are also cases in which BGP is used internally to provide reachability information. Doing so can
better optimize the intradomain routing to provide detailed routing information for multiple points of egress.
349
9. BGP Routing Configuration
BGP was developed to handle interdomain routing and eliminate issues surrounding such topics as routing
loops, backbone-to-backbone peering, and reachability information for IGPs for external networks. BGP is
used for both internal (IBGP) and external (EBGP) peering.
Figure 9-2 shows a very basic BGP logical view. Washington D.C., in AS100, has an EBGP session with New
York, in AS200. This session is considered external because it includes two neighbors, each in its own AS.
They are therefore external neighbors. There is also an IBGP session between New York and Boston in AS200,
so they are internal neighbors. Notice that there is no physical connection between the two. IBGP does not
require that the peers be directly connected. To take it one step further, we have included an internal router in
the physical path. There can be several non-BGP speaking routers within an AS. As long as the BGP speakers
can create a connection logically to each other, the peering session can be established.
www.ebook-converter.com
The main distinguishers between EBGP and IBGP include how the BGP process handles routing updates, the
use of attributes, and the propagation of routing information.
EBGP sessions work differently than IBGP sessions. Typical EBGP peering routers are directly connected.
However, EBGP can take advantage of logical connectivity, like IBGP sessions, through the use of the
multihop statement. This will be covered later in Section 9.4.2.21. Again, EBGP peers are not in the same
AS; therefore, when setting up peering, EBGP peers typically will not listen to other devices advertising BGP
routes to them unless they are explicitly configured to do so.
IBGP sessions, on the other hand, operate differently. Peer sessions can be established either through directly
connected interfaces or logical connectivity. There is no true dependence on physical topology. In BGP, the
next-hop is almost always validated by a recursive lookup in the IGP routing table. If there is no next-hop route
to the border router (NEXT_HOP attribute), then BGP will not allow the route to be installed into the routing
table. IBGP also mandates that each IBGP-speaking router have a peering session with every other IBGP-
speaking router. This concept is known as IBGP full-mesh, or the IBGP mesh. In IBGP when a route is learned
from another IBGP peer, the receiving system will not advertise the route to other IBGP neighbors, owing to
the full-mesh concept. Since the advertisement will already have been sent to all peers from the original sender,
www.ebook-converter.com
properly and a single physical interface to the local system is up, IBGP peering can be established.
www.ebook-converter.com
BGP provides reachability information for the Internet. This section will discuss a few of the common
scenarios regarding transit and nontransit AS and homing.
Homing
Homing generally refers to how an AS is interconnected. This section describes common homing topologies
and provides more detailed explanation of transit and nontransit ASs. There are three different characteristics
that an AS may take on:
1. Single-homed (stub AS), which has one ingress/egress point for all traffic
2. Multihomed nontransit, which has multiple ingress/egress points for traffic flow (nontransit indicates that
the AS should not be used to carry traffic or advertise routes for traffic not destined for the AS)
3. Multihomed transit, which also has multiple ingress/egress points for traffic flow (transit means policy
conditions are applied to allow negotiated traffic not destined for the AS to flow through the AS)
www.ebook-converter.com
A quick way to determine if a topology is considered multihomed or not is to determine if there are multiple
border routers or multiple links exiting a single router or AS.
Figure 9-5 illustrates a stub/single-homed router. Washington D.C. is connected to New York via some circuit.
New York has multiple connections to the rest of the Internet. Since Washington D.C. only has one egress
point it is single-homed and a stub. Figure 9-6 has a similar topology as Figure 9-5, but now there are two
circuits between Washington D.C. and New York. Washington D.C. is still a stub, but it is multihomed. It
would not make any sense to attempt to use Washington D.C. in this case for any transit traffic. It would only
add an additional hop to the path and would be a poor implementation of policy.
353
9. BGP Routing Configuration
www.ebook-converter.com
AS100 for transit would be a waste of time, and in reality AS100 probably would not advertise itself as being
able to reach any prefixes other than those assigned to the AS itself. Nonetheless, if poor policy is used,
suboptimal routing conditions could occur. It is vital to understand your connection points and policy.
www.ebook-converter.com
www.ebook-converter.com
356
9. BGP Routing Configuration
www.ebook-converter.com
architecture they can. These scenarios have pointed out just a few of the potential cases that can occur,
depending on transit and homing conditions.
Routing
Routing, in general, is the process for selecting a path over which to route traffic. BGP evaluates several
attributes prior to selecting a route to a prefix and installing it into the routing table. You will recall that an IGP
is typically based on either distance vector or link state routing principles. These are used to determine a loop-
free routing topology internal to the AS. BGP, on the other hand, is a path vector protocol and uses a list of
ASNs within the routing information to determine a loop-free path to destination networks.
The next few sections will look at how route-preference and default-route selection criteria play key roles in
how JUNOS decides to select routes. The first subject is the RIB and how it applies to BGP.
RIB
357
9. BGP Routing Configuration
AS_PATH routing loops. The routes here have not been manipulated by any import policies. These are the
routes on which your BGP import policy would be performed, as would recursive lookups in the routing
table for valid next-hop addresses. See the keep statement in Section 9.4.2 for additional information.
2. Loc-RIB contains routes that have come from the Adj-RIB-In tables and have gone through validation
and policy. These would be considered your inet.0 routing table, which is discussed in Section 9.1.4.2.
3. Adj-RIB-Out contains routes that will be advertised by the local router to its BGP peers. This table is
where routes would be placed after being evaluated by your BGP export policy. Once here, they will be
advertised to the corresponding BGP peer.
Chapter 11 provides in-depth explanation of JUNOS policy.
Routing Tables
JUNOS places all unicast routes in table inet.0. So, the routes that are learned via BGP, which pass through
the import policy and have a valid next-hop, will be placed here. Table 9-1 lists the various predefined routing
tables in JUNOS and their use.
Table 9-1. JUNOS Routing Tables
Table Function
inet.0 Default unicast routing table
Instance-name.inet.0Unicast routing table for a given routing instance
inet.1 Multicast forwarding cache
inet.2 Unicast routes used for multicast reverse path forwarding (RPF) lookup
www.ebook-converter.com
inet.3 MPLS routing table for path information
mpls.0 MPLS routing table for LSP next-hops
BGP route decisions work a bit differently from IGP route decisions. JUNOS will prefer routes in table
inet.3 for next-hop resolution over those listed in table inet.0 when MPLS and traffic engineering are
enabled and in use. Details on inet.3 can be found in Section 12.3.3. In addition to these tables, you have the
ability to create your own tables for customized purposes. You can apply import and export policies to these
tables just as you would to any of the default tables.
Route Preference
JUNOS uses protocol preference to choose which routes will become active in the routing table. This can be
easily manipulated in JUNOS and can be useful in scenarios where it is necessary to prefer routes learned from
one protocol over those learned from another. There is also the ability to use preference in tiebreaking. The
preference statement is used to specify a preference of the protocol in terms of its association with the
other protocols. Thus, you can cause BGP to be preferred over OSPF, for example. Table 9-2 lists the protocols
358
9. BGP Routing Configuration
Routing Protocol JUNOS Default Preference Value
Direct 0
Static 5
MPLS (RSVP) 7
MPLS (LDP) 9
OSPF Internal Route 10
IS-IS Level 1 Internal Route15
IS-IS Level 2 Internal Route18
Redirects 30
RIP 100
Point-to-Point Interfaces 110
Generated or Aggregate 130
OSPF AS External Routes 150
IS-IS Level 1 Internal Route160
IS-IS Level 2 Internal Route165
BGP 170
www.ebook-converter.com
route. It chooses first based upon protocol preference, as listed in Table 9-2. For instance, RIP routes
(default preference value of 100) will take preference over OSPF AS external routes (default preference
value of 150), while OSPF internal routes (default preference value of 10) will take preference over RIP
routes. Routes that are rejected and marked (as unusable) are given a preference of –1. These routes will
never be installed as active routes, regardless of their protocol ranking. If the decision-making process
decides to use BGP routes, the following process is followed.
2. As long as BGP can do a recursive lookup and resolve the next-hop for a prefix in the existing routing
table, then the route will be installed in the LOC-In RIB. If there is no valid next-hop in the routing table,
then JUNOS will hide the route. Once routes make it to the LOC-In, JUNOS will continue through the
route-selection process.
3. JUNOS will then select the BGP route with the highest LOCAL_PREF. The higher the value, the more
preferred the route is. LOCAL_PREF is set internally to the AS according to policy. If this is equal, then
JUNOS will move on to the next step.
4. If the routes being compared both contain AS_PATH information, JUNOS will select the route with the
359
9. BGP Routing Configuration
1. IGP
2. EGP
3. Incomplete
6. MED value is the next criteria to be compared. The path with the lowest MED value will be chosen. Think of
MED as a metric, which are typically preferred based on the lowest value. This only occurs if prefixes are
learned from the same AS. There is a MED case study to refer to in Section 10.2.4.
7. JUNOS will next choose routes learned via EBGP over IBGP. EBGP is generated externally and is
considered cheaper than internally generated routes. This is commonly referred to as hot potato routing.
8. Next, JUNOS will prefer routes with whose next-hop has the lowest IGP metric to the border router.
9. Routes in table inet.3 will be chosen over routes in inet.0 (MPLS-centric).
10. Routes with a greater number of next-hops will be preferred. This means if prefix 172.16/16 has two
next-hops, and next-hop A has four routes in the IGP, and next-hop B has two routes in the IGP, BGP will
install the route with next-hop A.
11. If route reflectors are used, BGP will choose the route with the shorter CLUSTER_LIST.
12. The route with the lowest RID will be chosen.
13. Routes from the peer with the lowest peer ID will be selected.
www.ebook-converter.com
This process is valid only for BGP route selection. Route selection in JUNOS, in general, encompasses these
criteria, plus more relating to individual IGPs. Policy can also be used to manipulate routes, so you can force
them to pass certain criteria in this selection process. Use caution when doing this, as suboptimal routing may
occur.
Default Routes
A default route will be used if no other more specific route for a given destination exists in the current routing
table. In BGP, this is important for several reasons. If your local AS is not receiving full Internet routes, or does
not need to receive full Internet routes, then you may attempt to send data to a destination that is not listed in
the routing table. You do not want to statically assign this default route unless it is absolutely necessary. The
preferred method is to have the upstream provider announce a default (0.0.0.0/0) route to your BGP
border router. In turn, you want your border router to announce the default into the IGP. In this way, your
entire routing domain should be able to see the default route. If the link for the default should go away, the
default route will go away, and the packet will be dropped, as it should be.
The benefit of doing this over static definition is obvious. If static definition were used, the default route could
Downloader demo watermarks
point to a destination that may not actually be reachable or that could go away due to a change. The dynamic
method of introducing the default route is preferred because it will go away only when it is not physically
accessible.
Transport
BGP uses TCP (port 179) as the underlying transport protocol. This provides the reliable transport function,
error correction, and retransmission of the higher-level data, if necessary. TCP relies on IP as the network layer
protocol. So, if there is IP connectivity to a destination, the TCP session should remain active. This will become
relevant during our discussion on peering and how logical peering works.
Events
In BGP there are 13 different events that cause the FSM to change states. Since an FSM is based on a
calculated response to a predetermined number of possible events, the state change is predictable. However,
the state-event correlation relies not only on the event, but on the current state of the FSM. The following
events allow the FSM state to change:
BGP start
www.ebook-converter.com
BGP stop
BGP transport connection Open
BGP transport connection Closed
BGP transport connection open Failed
BGP transport fatal error
Connect-retry timer expired
Hold timer expired
Keepalive timer expired
361
9. BGP Routing Configuration
Receive NOTIFICATION message
The next section will discuss the various connection states and how the above listed events determine state
change.
Connection States
There are six different states to the FSM as documented in RFC 1771. Each state represents where the BGP
process is in terms of operation, but also predicates what type of events can occur to cause the state to change.
Idle
The initial state of the BGP process is Idle. In this state, the local system is essentially waiting for some start
event to get the process moving. The most common start event is nothing more than the network administrator
configuring the local system to peer with a remote system.
Depending on which configuration parameters are used, the local system will either wait for incoming TCP
connection on port 179 and subsequent OPEN messages, or it will attempt to establish a TCP connection and
begin sending OPEN messages. In JUNOS, if the passive parameter is used, the local system will listen for an
incoming TCP connection on TCP port 179, then listen for incoming OPEN messages. If the passive parameter
is not used, the local system will start a connect-retry timer and attempt to establish a TCP connection on port
179 to the remote system. BGP is typically configured on one router and then on the other, so the first one is
usually trying to establish a connection prior to the remote system being configured. Regardless, if both systems
attempt to create a peering session at the same time, the potential for two peering sessions between the same
neighbors exists. RFC 1771 outlines a mechanism called connection-collision detection, which will prevent
www.ebook-converter.com
multiple sessions between the same neighbors from being established. Once the TCP connection attempt is
started, the FSM will transition to the Connect state.
Connect
This state occurs when the local system sees a TCP connection initiated on port 179. This state is key to the
overall operation of BGP. If the local system cannot transition out of the Connect state, there is a potential
problem with establishing the TCP connection. This can be a useful tip in troubleshooting BGP peering
problems.
When the TCP connection is established, the local system will reset the connect-retry timer it started earlier
and will send an OPEN message to the remote system. When the local system sends the first OPEN message, the
FSM transitions to the OpenSent state.
Active
If the router is unable to create the TCP connection, the FSM will transition to the Active state. In this state,
Downloader demo watermarks
the local system will still try to create the TCP connection. If it is able to complete the connection, the local
system will send out the OPEN message to the potential peer, and the FSM will transition to the OpenSent
state. In the Active state, the local system is capable of receiving a connection attempt from a potential
neighbor.
362
9. BGP Routing Configuration
OpenSent
When the local system sends out its OPEN message, the FSM will transition to the OpenSent state. When this
occurs, the local system will listen for an OPEN message from the remote system. When the local system
receives an OPEN message from the remote system, it sends out a KEEPALIVE message to the remote, and the
FSM transitions to the OpenConfirm state.
When the OPEN message is received from the remote system, the local system is able to determine certain
characteristics about the session. If the ASN is different than the local system, the session will be external; if it
is the same, then it will be internal.
OpenConfirm
When the FSM in the local system reaches this state, it waits for the KEEPALIVE message to be sent from the
remote system. When the local system receives the KEEPALIVE message from the remote system, the FSM
will then change to the Established state. If the hold timers expire here, the local system will send a
NOTIFICATION message to the remote system, and the FSM will change to the Idle state.
Established
When the FSM for the peering session transitions to the Established state, the peers are now ready to begin
sending UPDATE messages to exchange reachability information.
When a BGP session is truly UP and the FSM is in the Established state, the following can be assumed:
The BGP process has been started.
www.ebook-converter.com
A reliable transport session has been created.
OPEN messages have been exchanged successfully, and session parameters have been negotiated.
KEEPALIVE messages have been received successfully, and no error condition exists.
363
9. BGP Routing Configuration
2. Length (2 bytes)—. indicates the total length of the BGP message to a receiving system
3. Type (1 byte)—. indicates the message type
OPEN—. 0001 (1)
UPDATE—. 0010 (2)
NOTIFICATION—. 0011 (3)
KEEPALIVE—. 0100 (4)
OPEN Message
The OPEN message is sent by the local system once the TCP connection between the two potential peers has
been created. Figure 9-15 illustrates the following OPEN message fields:
Version (1 byte)—. This indicates the version of BGP used by the local system (in the case of Juniper
Networks, it is BGP4).
www.ebook-converter.com
My AS (2 bytes)—. This indicates the local system's ASN.
Hold time (2 bytes)—. This indicates the configured hold time of the local system. The hold time will be
negotiated between local and remote systems if they are not equal. A value of 0 indicates no use of the
hold timer or keepalive timer.
BGP identifier (4 bytes)—. This is the RID field. In JUNOS, the use of the router-id statement will set
this value. Otherwise, the value will be taken from the lowest configured IP address on the router.
Optional parameters length (1 byte)—. This indicates the length of the optional parameters field. When
this field is set to 0, there will not be any optional parameters in the packet.
Optional parameters (variable)—. This is a variable-length field comprising the following parameters (see
Figure 9-16):
Parameter type (1 byte)—. This indicates the type of parameter that will be used. RFC 1771 only
defines one optional parameter, authentication information (parameter type 1). RFC 2842 makes a
364
9. BGP Routing Configuration
Parameter value (variable)—. This is assigned based upon the parameter type field.
UPDATE Message
BGP uses UPDATE messages to exchange all routing information related to BGP. A single message can contain
both NLRI with attributes and a list of withdrawn routes. If the attributes are equal, multiple prefixes can be
sent in a single message. This functionality provides an efficient method of information exchange by combining
multiple functions into a single message.
The UPDATE message can be thought of as having three distinct categories:
1. Unfeasible routes (withdrawn routes that no longer exist)
2. NLRI (prefix and mask, such as 192.168.0.0/16)
www.ebook-converter.com
3. Path attributes (such as MED or AS_PATH)
Unlike some IGPs, where route information is used to construct a topology (usually with the local system as
root of that tree), BGP uses a list of ASs that the NLRI has passed through. This list is built on the concept of
creating a loop-free path to the destination prefix.
Figure 9-17 illustrates the format of the UPDATE message. The BGP UPDATE message fields are as follows:
Unfeasible routes length (2 bytes)—. This indicates the length of the withdrawn routes field. A value of 0
tells the receiving system that no withdrawn routes are listed in this UPDATE message.
Withdrawn routes (variable)—. This consists of IP prefixes to be removed or withdrawn from the routing
table. Each prefix is actually broken down to two parts, prefix length and prefix (see Figure 9-18). The
length in this case is not related to the actual physical space of the prefix field, but rather to the subnet
mask in terms of bits:
365
9. BGP Routing Configuration
www.ebook-converter.com
The first four high-order bits determine the category of the attribute.
NOTIFICATION Message
Any BGP-speaking router will send a NOTIFICATION message whenever an error condition exists. When this
message is sent, the sending router closes the BGP session and transitions to the Idle state. The notification
message consist of three fields (see Figure 9-21):
1. Data (variable)—. provides additional information on the error (e.g., incorrect RID information received
for a session would cause an error condition. This piece of data could be placed here).
2. Error code (1 byte)—. see Table 9-3 for values.
3. Error subcode (1 byte)—. see Table 9-3 for values.
www.ebook-converter.com
Figure 9-21. NOTIFICATION Message Format
The error codes and subcodes indicate the major and minor reasons for which the error was detected. The
various error codes and subcodes are essential to the control of the BGP process over the session. If this
particular information was not evaluated and the error codes were not available, there would be devastating
effects on the integrity of the route information passed through ASs and the Internet. Table 9-3 lists these error
codes. The numbers following each code indicate the decimal equivalent.
Table 9-3. NOTIFICATION Message Error Codes
KEEPALIVE Message
KEEPALIVE messages are exchanged to let each peering neighbor know that the other is there (see Figure 9-
22). Two other elements are used: the hold timer and the KEEPALIVE messages. These messages cannot be
any more frequent than one per second. When the BGP session is first negotiated, the HoldTime is agreed
upon. If the agreed upon HoldTime is set to 0, then no KEEPALIVE messages will be sent. As noted
previously, the KEEPALIVE messages consist only of the BGP header.
www.ebook-converter.com
Figure 9-22. KEEPALIVE Message Format
Attributes
This section will discuss the attributes associated with BGP and what each means. Attributes are passed in
UPDATE messages. There are four categories of BGP path attributes:
1. Well-known mandatory—. must accompany each advertisement of the prefix
Well-known discretionary—. must be recognized by the BGP implementation, but it is at the discretion of
Downloader demo watermarks
2.
the local system as to whether or not the attribute will be sent in any UPDATE messages
3. Optional transitive—. does not need to be known by the BGP implementation, but it is recommended, due
to the attribute's transitive nature, for the local system to pass the attribute when announcing the prefix to
other systems
368
9. BGP Routing Configuration
4. Optional nontransitive—. does not need to be known by the BGP implementation, but, due to the nature
of the attribute, it is recommended that it not be passed to other peering neighbors via the UPDATE
message
Table 9-4 lists the ten most common attributes used in BGP by category name and type code. The type code is
the decimal value that is used in the UPDATE message to specify the type of attribute being passed.
Table 9-4. BGP Path Attributes
Attribute Category Type Code
ORIGIN Well-known mandatory 1
AS_PATH Well-known mandatory 2
NEXT_HOP Well-known mandatory 3
MULTI_EXIT_DISC Optional transitive 4
LOCAL_PREF Well-known discretionary5
ATOMIC_AGGREGATEWell-known discretionary6
AGGREGATOR Optional transitive 7
COMMUNITY Optional transitive 8
ORIGINATOR ID Optional nontransitive 9
CLUSTER_LIST Optional nontransitive 10
ORIGIN
This attribute gives an indication of how this particular prefix was learned. The following possible values can
be used:
www.ebook-converter.com
0 (IGP)—learned from the IGP in the originating AS
1 (EGP)—learned from the EGP in the originating AS
2 (Incomplete)—origin of this prefix cannot be determined
By default, JUNOS uses the ORIGIN code value 0, whether or not the route was learned from the IGP,
statically defined, or part of an aggregate route.
AS_PATH
The AS_PATH attribute lists ASs for which a prefix has been announced. This attribute serves two functions:
routing loop avoidance and path selection. If the receiving AS sees its own ASN in the AS_PATH list, it will
ignore that announcement.
NEXT_HOP
This attribute is vital in the route-selection process. In short, the NEXT_HOP attribute indicates the IP address
of the border router that can be used to reach a given destination, not the next-hop as in interface or gateway to
the next Layer 3 device. The show route <prefix> detail or show route <prefix>
extensive commands can be used to see both physical next-hops and protocol or border router next-hops.
Understanding NEXT_HOP and how it is used is essential to understanding BGP route selection. A case study in
Sections 10.2.2 and 10.2.3 covers NEXT_HOP.
MED
MED is a metric specified by an announcing external neighbor to identify the ingress point to use in the
announcing AS for a given prefix. This attribute is used by the announcing system to influence the local
system's decision process. When it is received, it can be propagated via IBGP, but does not get propagated
when the local AS advertises the route to another external AS. A case study in Section 10.2.4 can be
referenced for more information.
www.ebook-converter.com
LOCAL_PREF
LOCAL_PREF is used by IBGP to influence internal routers to use a particular border router to reach a given
prefix. The higher the value, the better the degree of preference. This means that if border router A advertises
prefix 10.10.0.0/16 with a LOCAL_PREF of 100, and border router B advertises 10.10.0.0/16 with a
LOCAL_PREF of 150, the internal routers will choose to send packets via border router B.
ATOMIC_AGGREGATE
Aggregation is a method by which the local system advertises a route representative of several more specific
routes that it knows about. When this occurs, there is a potential loss of information relating to the more
specific prefixes, such as AS_PATH. When this occurs, the local system will attach the ATOMIC_AGGREGATE
attribute to the prefix when advertising it. This is important for the receiving system of the route. If a local
system receives a prefix with the ATOMIC_AGGREGATE attribute set and does have a more specific
route, it will not advertise the more specific route. With this being said, it can be assumed in some cases that
routes with the ATOMIC_AGGREGATE attribute included will traverse ASs that may not be in the AS_PATH
Downloader demo watermarks
list. Aggregation can naturally cause loss of path information, hence the need to signal other systems that this
has occurred.
AGGREGATOR
370
9. BGP Routing Configuration
If a local system performs aggregation on a series of routes, it will include in the aggregated prefix
advertisement the local system ASN and local system IP address that performed the aggregation.
COMMUNITY
Communities and policy go hand in hand with BGP. You can assign several prefixes the same values by
including them in a particular community. Associated with this attribute are three well-known communities, as
defined in RFC 1997:
1. NO_EXPORT (0xFFFFFF01)—. Routes with this attribute value must not be advertised outside the AS
boundary.
2. NO_ADVERTISE (0xFFFFFF02)—. When this attribute is set, the local system does not advertise this
route to other BGP neighbors.
3. NO_EXPORT_SUBCONFED (0xFFFFFF03)—. Routes with this attribute set must not be advertised
outside the local AS to external peers. In confederation scenarios, a confederation boundary router will not
advertise the route to other external routers, even in the same parent AS.
Communities are essential in service provider networks. They can play a vital role in route coloring and further
enhancing the routing domain's ability to maintain routing-policy control. Section 11.7 provides coverage on
the use of communities.
ORIGINATOR_ID
This attribute is defined in RFC 1966. Simply put, the ORIGINATOR_ID is the RID of the router that
www.ebook-converter.com
originated the route into the AS. Route reflectors will not send a route learned from an originator back to that
originator. The route-reflector server will set this attribute when advertising the prefix to internal neighbors.
This attribute will not be sent to external neighbors.
CLUSTER_LIST
This is an optional nontransitive attribute and is used by BGP in route-reflector scenarios as well. The route-
reflector server sets the CLUSTER_LIST value. Any routes received with this attribute set to the local
CLUSTER_ID will be ignored. This, too, is part of the loop avoidance scheme in BGP route reflection and is
especially useful when implementing multiple route-reflector clusters within a single AS.
www.ebook-converter.com
protocols {
bgp {
group group-name {
type type;
neighbor address;
}
}
}
www.ebook-converter.com
type internal;
neighbor 10.0.23.2;
}
}
}
The above configuration can be created with the following two commands while in [edit] mode.
[edit]
lab@LosAngeles# set routing-options autonomous-system 100
[edit]
lab@LosAngeles# set protocols bgp group IBGP type internal neighbor 10.0.23.2
The configuration for San Francisco is shown next. The ASN for San Francisco is 100; the group name for the
peering session is IBGP. The type of session, of course, is internal, and the neighbor that we are peering with is
10.0.23.1.
routing-options {
Downloader demo watermarks
}
autonomous-system 100;
protocols {
bgp {
group IBGP {
373
9. BGP Routing Configuration
type internal;
neighbor 10.0.23.1;
}
}
}
Now, because we are only peering between physical interface addresses, we are done. We can issue several
commands to check the state of the peering session. We choose to use the show bgp neighbor command.
When we issue this command on Los Angeles, we see the output as shown below. The first highlighted item
shows the peer address and port number, peer AS100, local address and port, and local AS100. The type of
session is internal, and it is in the Established state, which indicates that the peering session is up.
lab@LosAngeles> show bgp neighbor 10.0.23.2
Peer: 10.0.23.2+179 AS100 Local: 10.0.23.1+1037 AS100
Type: Internal State: Established Flags: <>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: Open Message Error
Options: <Preference HoldTime Refresh>
Holdtime: 90 Preference: 170
Number of flaps: 0
Error: 'Open Message Error' Sent: 1 Recv: 0
Peer ID: 192.168.28.1 Local ID: 192.168.20.1 Active Holdtime: 90
Keepalive Interval: 30
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Table inet.0 Bit: 10000
www.ebook-converter.com
Send state: in sync
Active prefixes: 0
Received prefixes: 0
Suppressed due to damping: 0
Last traffic (seconds): Received 1 Sent 1 Checked 1
Input messages: Total 8 Updates 0 Refreshes 0 Octets 152
Output messages: Total 12 Updates 0 Refreshes 0 Octets 282
Output Queue[0]: 0
www.ebook-converter.com
routing-options {
autonomous-system autonomous-system;
}
protocols {
bgp {
group group-name {
type type;
neighbor address;
local-address address;
}
}
}
}
The configuration for router Los Angeles is shown below. The ASN for Los Angeles is 100; the group name for
the peering session is IBGP. The type of session, of course, is internal, and the neighbor that we are peering
Downloader demo watermarks
with is 192.168.28.1, which we know is the loopback interface address of the router we will peer with. In
addition, we now include the local-address statement, which, in this case, is 192.168.20.1. We now
have a configuration for IBGP to peer with our neighbor's loopback interface.
routing-options {
375
9. BGP Routing Configuration
autonomous-system 100;
}
protocols {
bgp {
group IBGP {
type internal;
neighbor 192.168.28.1;
local-address 192.168.20.1;
}
}
}
}
We choose to use the show bgp neighbor command. When we issue this command on Los Angeles, we
see the output listed below. The first highlighted item shows the peer address and port number, peer AS100,
local address and port, and local AS100. The type of session is internal, and the state is established, which
indicates the peering session is up. In this example, you will also see the Local Address field used. In this
case, it shows our own loopback interface address.
lab@LosAngeles> show bgp neighbor 192.168.28.1
Peer: 192.168.28.1+179 AS100 Local: 192.168.20.1+1038 AS100
Type: Internal State: Established Flags: <>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Options: <Preference LocalAddress HoldTime Refresh>
Local Address: 192.168.20.1 Holdtime: 90 Preference: 170
Number of flaps: 0
www.ebook-converter.com
Peer ID: 192.168.28.1
Keepalive Interval: 30
Local ID: 192.168.20.1
376
9. BGP Routing Configuration
protocols bgp] hierarchy, group, type, neighbor, and peer-as are specified. Though local-address is
not necessary for a typical directly connected interface peering session, you will see how the local-
address and multihop statement can be used in the second EBGP configuration scenario.
routing-options {
autonomous-system autonomous-system;
}
protocols {
bgp {
group group-name {
type type;
neighbor address;
peer-as autonomous-system;
}
}
}
}
www.ebook-converter.com
Los Angeles is 100; the group name for the peering session is EBGP. The type of session, of course, is external,
and the neighbor that we are peering with is 10.0.23.2. Remember, for now we are peering only through the
physical interfaces.
www.ebook-converter.com
peer address and port number: peer AS200, local address and port, and local AS100. The type of session is
external, and the state is Established, which indicates the peering session is up.
lab@LosAngeles> show bgp neighbor 10.0.23.2
Peer: 10.0.23.2+179 AS200 Local: 10.0.23.1+1040 AS100
Type: External State: Established Flags: <>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: Open Message Error
Options: <Preference HoldTime PeerAS Refresh>
Holdtime: 90 Preference: 170
Number of flaps: 0
Error: 'Open Message Error' Sent: 1 Recv: 0
Peer ID: 192.168.28.1 Local ID: 192.168.20.1 Active Holdtime: 90
Keepalive Interval: 30
Local Interface: fe-0/1/0.0
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Downloader demo watermarks
Peer supports Refresh capability (2)
Table inet.0 Bit: 10000
Send state: in sync
Active prefixes: 0
Received prefixes: 0
378
9. BGP Routing Configuration
Suppressed due to damping: 0
Last traffic (seconds): Received 2 Sent 2 Checked 2
Input messages: Total 3 Updates 0 Refreshes 0 Octets 57
Output messages: Total 7 Updates 0 Refreshes 0 Octets 187
Output Queue[0]: 0
RID
BGP uses an RID to identify the system from which an advertisement comes. In the case of JUNOS, one either
has to be defined in the [edit routing-options] hierarchy or taken from the first interface with an IP
address assigned, typically the loopback interface. The simplest way to figure out what your RID is by
assigning one. The following example shows the set command to use while in [edit] mode.
set routing-options router-id 100.100.100.100
routing-options {
router-id 100.100.100.100;
}
Configuration Parameters
Before we get into configuration scenarios, it is important to understand what configurable options you will
have under the JUNOS command hierarchy. Due to the infinite number of configuration scenarios for BGP,
only the most common configuration parameters are listed here. BGP in JUNOS can be configured under
multiple hierarchies. The different hierarchies are listed in Table 9-5. However, for clarity, we will provide
configuration examples using the basic [edit protocols bgp] hierarchy, but you should understand that
www.ebook-converter.com
the same configuration parameters are valid for all the various listed hierarchies.
Table 9-5. BGP Protocol Hierarchy Levels and Command Syntaxes
Level Number Hierarchy
[edit protocols bgp]
1 set protocols bgp ...
2 [edit protocols bgp group group-name]
set protocols bgp group group-name ...
[edit protocols bgp group group-name neighbor address]
3 set protocols bgp group group-name neighbor
address ...
[edit routing-instances routing-instance-name
4 protocols bgp]
set routing-instances routing-instance-name
protocols bgp ...
5 [edit routing-instances routing-instance-name
protocols bgp
group group-name]
set routing-instances routing-instance-name
protocols bgp
group group-name ...
[edit routing-instances routing-instance-name
6
Downloader demo watermarks
protocols bgp
group group-name neighbor address]
set routing-instances routing-instance-name
protocols bgp
group group-name neighbor address ...
Configuration Hierarchy
379
9. BGP Routing Configuration
As has been mentioned earlier, there are several instances in which some protocol-independent routing
properties must be configured to use certain features. These can be found under the [routing-options]
and [policy-options] hierarchy. Due to the scope of this chapter, we will not deviate outside the
properties that directly relate to the BGP protocol.
Under the [edit protocols bgp] hierarchy, there are three distinct levels of configuration:
1. Global
2. Group
3. Peer
JUNOS uses a very hierarchical configuration process. Each hierarchy takes precedence over the previous.
This means that parameters configured at the group level will take precedence over anything configured at the
global level. This approach provides a very structured configuration file that is easy to read. Developing a
configuration policy or guideline will help to ensure that configurations are implemented in a specific manner
and to eliminate the use of several different styles of configuration across the network.
As mentioned before, there are several ways to configure BGP in JUNOS and achieve the same desired end
result. For ease of explanation and clarity, we will list each configuration statement, its syntax, the hierarchy
level at which the statement can be configured (see Table 9-5 for a list of hierarchy names and their levels).
Configuration Statements
The following statements are listed to provide insight into the BGP options configurable in JUNOS BGP.
www.ebook-converter.com
Although there are several configuration scenarios and multiple ways to accomplish tasks like peering, this
should provide adequate explanation to help you understand the basics and get BGP up and running.
advertise-inactive
JUNOS learns routes from various sources. Owing to policy and configuration, some of these routes will not be
chosen as the preferred route and thus will not be marked active. The routes remain in the routing table, while
the active routes are sent to the master forwarding table in the PFE. In BGP you can advertise these inactive
routes, thereby transporting them to another router. That router, owing to its policy, may or may not utilize the
routes received. Regardless, you can advertise the inactive routes in the routing table. Table 9-6 shows the
advertise-inactive configuration statement's syntax and the levels at which it can be configured.
Table 9-6. advertise-inactive Configuration Statement
Syntaxadvertise-inactive;
Level 1, 2, 3, 4, 5, 6
as-override
The default behavior of BGP is to reject routes that have the local ASN in the AS_PATH for the advertised
route to avoid routing loops. The as-override parameter allows JUNOS to override this characteristic and
accept the route advertisement. Great caution should be used when implementing this parameter, as routing
loops and suboptimal routing conditions can occur. Table 9-8 shows the as-override configuration
statement's syntax and the levels at which it can be configured.
Table 9-8. as-override Configuration Statement
Syntaxas-override;
Level 2, 3, 5, 6
authentication-key
BGP4 supports authentication. This authentication is used to send an encrypted checksum between two
www.ebook-converter.com
routers, using a predetermined authentication key. When entering the key, you can use up to 255 characters of
plain text. However, when displayed, the encrypted version of the key is shown. If there is a need to use spaces
as part of the key, make sure the key is enclosed in quotation marks. Although the use of authentication can
ensure peering with authorized peers, the implementation will not work with the allow statement. Table 9-9
shows the authentication-key configuration statement's syntax and the levels at which it can be
configured.
Table 9-9. authentication-key Configuration Statement
bgp
BGP4 is the only EGP available in Juniper Networks routers. When configuring BGP, you cannot just issue the
Syntaxbgp { … }
Level 1, 4 381
9. BGP Routing Configuration
Level 1, 4
cluster
For scaling purposes, BGP supports a function known as route reflection. Each route-reflector cluster requires
a cluster-identifier, which is unique to the AS or confederation in which the system resides. The
identifier is in the form of an IP address. Table 9-11 shows the cluster configuration statement's syntax and
the levels at which it can be configured.
Table 9-11. cluster Configuration Statement
damping
BGP routes commonly consist of reachability information from ASs throughout the Internet. Reliability of
these ASs is typically outside the local AS's control and responsibility. Thus, the continual adding or withdrawl
of routes—a condition known as flapping—can cause a large number of UPDATE messages to be injected into
the BGP routing domain, in turn causing instability within the local AS routing infrastructure.
Damping is a method by which you can control how often BGP recalculates your BGP tables in a route flap
condition. By default, damping is disabled in JUNOS. Once damping is enabled, specific parameters, such as
decay, hold-down, reuse, and cutoff, can be configured under the [edit policy-options]
hierarchy. Table 9-12 shows the damping configuration statement's syntax and the levels at which it can be
configured.
www.ebook-converter.com
Table 9-12. damping Configuration Statement
Syntaxdamping;
Level 1, 2, 3, 4, 5, 6
description
Within the configuration of JUNOS, you can place descriptions annotating configuration parameters and
statements. This provides the opportunity to add clarity to otherwise complex portions of the configuration. If
the description is going to have spaces, then the use of quotation marks to enclose it is necessary. Table 9-13
shows the description configuration statement's syntax and the levels at which it can be configured.
Table 9-13. description Configuration Statement
Level 1, 2, 3, 4, 5, 6
disable
382
9. BGP Routing Configuration
JUNOS supports the disabling of a set of configuration statements without removing them from the actual
configuration. Pay close attention to the hierarchy in which the statement can be applied. Table 9-14 shows the
disable configuration statement's syntax and the levels at which it can be configured.
Table 9-14. disable Configuration Statement
Syntaxdisable;
Level 1, 4
export
The export parameter is used to indicate which policies are to be used to move routes from the routing table
into the BGP protocol for advertisement. Table 9-15 shows the export configuration statement's syntax and
the levels at which it can be configured.
Table 9-15. export Configuration Statement
family
By default, BGP only sends unicast reachability information. By using the family inet statement, we are
enabling Multiprotocol BGP (MBGP). This allows the local router to propagate NLRI for multicast and unicast
systems. JUNOS must have an MBGP peer to send multicast NLRI. Otherwise, only unicast NLRI will be
passed. Table 9-16 shows the family configuration statement's syntax and the levels at which it can be
www.ebook-converter.com
configured.
Table 9-16. family Configuration Statement
Syntax family(any
inet {
| multicast | unicast_{
prefix-limit {V
maximum number;
teardown <percentage>;
}
rib-group routing-table-group-name;
}
}
Level 1, 2, 3, 4, 5, 6
group
Groups can be defined in JUNOS BGP for peer relationships that share the same characteristics. If a group is
assigned, any configuration parameters applied affect not only the whole group, but override any parameters
applied at the global level. Table 9-17 shows the group configuration statement's syntax and the levels at
Downloader demo watermarks
which it can be configured.
Table 9-17. group Configuration Statement
hold-time
Earlier in this chapter, we discussed, in general terms, the establishment of BGP sessions in Sections 9.1 and
9.2. Part of this establishment was the exchange of KeepAlive and UPDATE messages. However, in the
exchange of these messages, the time period for the hold-time counter is exchanged. In JUNOS, the hold-
time default value is 90 seconds. Most implementations of BGP autonegotiate the hold-time during the
session-establishment process. If one side of the session wants to use a different value, this can be negotiated.
If a value of 0 is configured, then the local system will not pass KEEPALIVE messages. If the remote system is
not configured properly for this characteristic, the BGP session will not establish properly. Table 9-18 shows
the hold-time configuration statement's syntax and the levels at which it can be configured.
Table 9-18. hold-time Configuration Statement
Syntaxhold-time seconds;
Level 1, 2, 3, 4, 5, 6
import
The import parameter is used to list the policies to apply to routes sent from BGP to the routing table. Table 9-
19 shows the import configuration statement's syntax and the levels at which it can be configured.
Table 9-19. import Configuration Statement
www.ebook-converter.com
Level 1, 2, 3, 4, 5, 6
keep
This statement manipulates how JUNOS treats BGP routes in the Adj-RIB-In table. By default, JUNOS,
which does not use the keep statement, keeps all routes that are received by BGP and not looped in the Adj-
RIB-In table. If the keep all statement is used, JUNOS will keep all of the routes, regardless of any loops
in the path. If the keep none statement is used, then JUNOS will discard all BGP routes in the Adj_RIB-In
table, once the input policy has been run on them. If the input policy is changed and needs to be run again,
JUNOS will have to request that the peer readvertise the routes, then run the import policy on the routes again.
If the default of not using the keep statement or keep all statement is used, JUNOS will simply run the
import policy against the Adj-RIB-In table upon a change to the policy. This is similar to the soft-
reconfigure on a Cisco router. See Section 9.1.4 for additional RIB information. Table 9-20 shows the keep
configuration statement's syntax and the levels at which it can be configured.
Table 9-20. keep Configuration Statement
local-address
384
9. BGP Routing Configuration
When establishing a BGP peering session, part of the validation process is to check the incoming RID against
that which is configured for the peer. If there is a mismatch of these addresses, the session will not establish.
When configuring a session, unless specified otherwise, the address of the egress interface will be used in the
BGP session. This works most of the time for EBGP sessions. However, in IBGP it is more common to peer
with loopback interface addresses. Using the local-address statement will instruct JUNOS to use a
specified address in the BGP header. It is important that if this is used in the local system, the remote system
must use the same address as its neighbor. Table 9-21 shows the local-address configuration statement's
syntax and the levels at which it can be configured.
Table 9-21. local-address Configuration Statement
local-as
Configuration of this statement allows for a virtual AS on the router. When using this statement, the local
router will use this ASN for the peering relationship. Thus, when receiving an update from a remote peer, the
local system will prepend the path with the local-as prior to installing it in the routing table. If the keyword
private is specified in the statement, then the local-as information will not be prepended to the AS_PATH.
This is a useful feature at times when multiple ASNs are necessary for peering purposes, but what gets
advertised out does not need this additional AS. Table 9-22 shows the local-as configuration statement's
syntax and the levels at which it can be configured.
Table 9-22. local-as Configuration Statement
www.ebook-converter.com
Syntaxlocal-as autonomous-system <private>;
Level 1, 2, 3, 4, 5, 6
local-preference
In IBGP the LOCAL_PREF attribute is used to establish a level of preference to certain prefixes. For instance,
if there are multiple egress points from the local AS to the rest of the Internet, then a preference can be given
to a particular egress point. This is essential when trying to shape traffic towards certain egress points. The
higher the local preference, the more preferred it is over others. The default LOCAL_PREF value in JUNOS is
100. Table 9-23 shows the local-preference configuration statement's syntax and the levels at which it
can be configured.
Table 9-23. local-preference Configuration Statement
Syntaxlog-updown;
Level 1, 2, 3, 4, 5, 6
metric-out
When sending MED values to external peers, the metric-out statement can be used to set this value
explicitly. When presented with multiple exit points, and all things being equal, the receiving AS will prefer the
egress point with the lowest MED value. The metric-out option provides a constant MED value. There is a lot
of flexibility with the statement; however, policy on a per-peer basis will allow the same amount of flexibility,
if not more. Table 9-25 shows the metric-out configuration statement's syntax and the levels at which it can
be configured.
Table 9-25. metric-out Configuration Statement
www.ebook-converter.com
multihop
A characteristic of EBGP is that the IP packets used for the BGP sessions and messages have a TTL value of 1
by default. This means that BGP peers needing to establish an EBGP session must be directly connected. The
multihop statement can be used to change this characteristic of EBGP sessions by providing the ability to
assign the TTL value and provide flexibility in implementation.
There are often times when it is necessary to establish an EBGP session between two systems that are not
directly connected. This is common in Network Access Points (NAPs) and peering points where individual
systems may be connected to a third-party system, such as a Layer 3 switch. This means the individual systems
are not directly connected. In our typical EBGP scenario, the IP packets with the BGP information would be
dropped after the first hop owing to the TTL expiring. When we use the multihop statement in our
configuration, we arbitrarily set the TTL to 255 to prevent it from expiring. Now, when we attempt to establish
our EBGP session between nondirectly connected peers, it will establish.
386
9. BGP Routing Configuration
group EBGP-Mhop {
type external;
multihop ttl 3;
neighbor 10.0.23.1 {
peer-AS300;
}
}
Table 9-26. multiphop Configuration Statement
Syntax multiphop;
multihop ttl <ttl-value>;
Level 1, 2, 3, 4, 5, 6
multipath
This is an essential part of load balancing. Juniper Networks routers support 8 or 16 equal-cost paths,
depending on the type of Internet processor ASIC installed on the local system. If the local system is using the
Internet Processor I, then there is the possibility for 8 equal-cost paths; if the Internet Processor II ASIC is in
the system, there is a capability of 16 equal-cost paths. The multipath statement allows JUNOS to bypass
the lowest RID decision, which is the last tiebreaker for route selection. Table 9-27 shows the multipath
configuration statement's syntax and the levels at which it can be configured.
Table 9-27. multipath Configuration Statement
Syntaxmultipath;
Level 2, 3, 5, 6
www.ebook-converter.com
neighbor
BGP requires a neighbor to peer with. The address used is the same address that will be considered as the RID
of the remote system. If it is not set correctly, the session will not establish. Table 9-28 shows the neighbor
configuration statement's syntax and the levels at which it can be configured.
Table 9-28. neighbor Configuration Statement
Syntaxneighbor address;
Level 2 and 5
no-aggregator-id
Juniper Networks routers are capable of route aggregation. This allows for fewer routes to be advertised by
using less-specific network statements, thereby covering more hosts and networks with a single statement.
387
9. BGP Routing Configuration
Table 9-29. no-aggregator-id Configuration Statement
Syntaxno-aggregator-id;
Level 1, 2, 3, 4, 5, 6
no-client-reflect
In route reflection, the route reflector receives a route from a route-reflector client, and then propagates that
route to other clients in the cluster. The typical scenario for the clients in this case is to peer only with the route
reflector. In the event that a client is fully meshed with other clients (this is common in migration scenarios), it
is undesirable for the route reflector to advertise redundant routing information. JUNOS allows us to control
this with the no-client-reflect statement. In the event the client is fully meshed with other clients, it
will send out its advertisement to everyone with whom it peers. The route reflector would still send the route
information to everyone with whom it peers, as well. This excess information does not need to be advertised
out because of the full-mesh. The use of no-client-reflect prevents the route reflector from readvertising routes
learned from a client that we know to be fully meshed with the other IBGP speakers. Table 9-30 shows the
no-client-reflect configuration statement's syntax and the levels at which it can be configured.
Table 9-30. no-client-reflect Configuration Statement
Syntaxno-client-reflect;
Level 1, 2, 3, 4, 5, 6
out-delay
In JUNOS, when a route is installed in the routing table and BGP is operational, the route will immediately be
www.ebook-converter.com
imported into BGP. The out-delay statement requires the route to remain in the table for a predetermined
amount of time before being imported into the BGP process. This can be useful in scenarios where flapping
becomes a problem and other controls besides damping need to be implemented. Table 9-31 shows the out-
delay configuration statement's syntax and the levels at which it can be configured.
Table 9-31. out-delay Configuration Statement
Syntaxout-delay second;
Level 1, 2, 3, 4, 5, 6
passive
JUNOS implements a parameter to allow for the establishment of passive BGP peering sessions. The passive
statement allows the BGP speaker to be configured for BGP, but will suppress the sending of the OPEN
message to a peer. Instead, it will stand by, waiting to receive an OPEN message, then go through the peer-
establishment process. This can be useful in migration scenarios where peers are being added. The local
path-selection
Part of the path-selection process in JUNOS includes the comparison of the MED value. This only occurs when
the local AS receives a prefix more than once from a single peer AS. If the prefix is received from two different
peer ASs, then the MED value will not be compared. JUNOS would simply go to the next path-selection criteria,
as outlined in Section 9.1.4.4. When MEDs are compared, JUNOS uses a deterministic method. By comparison,
Cisco defaults to a nondeterministic method, although Cisco does recommend the use of the bgp
deterministic-med statement when configuring BGP on their routers.
The difference between deterministic and nondeterministic methods is the way in which the MED value is
compared. The deterministic method will group routes together based on the announcing AS. So, if prefix
10.10.0.0/16 were announced from AS100 once and AS200 twice, they would be grouped. However, only
the MED values from AS200 would be compared, because JUNOS only will compare MED values from
advertisements received from the same AS. If the MED values were compared between AS200 announcements,
the winner of that comparison would then be compared to the AS100 announcement, and some other selection
criteria would choose which prefix advertisement to select.
When using Cisco-nondeterministic as the path-selection criteria, the routes will be compared in the order of
their receipt. So, if the announcement order were AS100, AS200, AS100, JUNOS would not compare the MEDs
of the first announcements because they are from different ASs. The winning route of this first announcement
would then be compared to the second announcement from AS100. Thus, if the first announcement won over
AS200, then AS100 would be compared against the second AS100 announcement. Whichever MED value was
preferred will be selected.
www.ebook-converter.com
When using the path-selection always-compare-med statement, JUNOS will compare MEDs
regardless of whether the announcement comes from the same AS or not. If an announcement for a prefix
comes in AS100, AS200, AS100, JUNOS will compare the MED of the first two announcements AS100 and
AS200, even though they are each from a different AS. Then, the winner will be compared to the third
announcement from AS100.
Note that due to potential loops, Cisco-nondeterministic is not recommended. Table 9-33 shows the path-
selection configuration statement's syntax and the levels at which it can be configured.
Table 9-33. path-selection Configuration Statement
peer-as
preference
In JUNOS, there is a preference placed on each protocol used. This preference is the same as the administrative
distance on Cisco routers. It is used to determine which route to make active in the routing table. All other
things being equal, the protocol with the lowest preference will be used. The preference statement can be used
to manipulate the default characteristics and modify the values assigned for each protocol. Table 9-35 shows
the preference configuration statement's syntax and the levels at which it can be configured.
Table 9-35. preference Configuration Statement
Syntaxpreference preference;
Level 1,2,3,4,5,6
prefix-limit
This statement allows us to limit the number of prefixes that will be accepted and would typically be set on a
per-peer basis. If customer A and the ISP have agreed that customer A will not send more than 10 prefix
advertisements to the ISP, the ISP would want to be able to enforce this. The maximum limit to 10 could be set
with the prefix-limit statement. A teardown would then be set, using a percentage of 90. This will log a
message when 90 percent of the maximum allowed prefixes have been sent and tear down the peering session
once the maximum threshold has been crossed. We can also specify a duration of how long to keep the peering
session down before attempting to re-establish the session. Table 9-36 shows the prefix-limit
configuration statement's syntax and the levels at which it can be configured.
www.ebook-converter.com
Table 9-36. prefix-limit Configuration Statement
Syntax prefix-limit {
maximum number;
teardown <percentage> idle-timeout (forever |
timelimit in minutes);
}
group cx-A {
type external;
peer-AS200;
neighbor 10.0.23.2 {
family inet {
unicast {
prefix-limit {
maximum 10;
teardown 90;
}
}
}
}
}
Level 1, 2, 3, 4, 5, 6
Syntaxprotocol protocol;
Level 2 and 5
remove-private
In BGP you can use private ASNs. These include confederation, private networks, or networks multihomed to
an AS with no official ASNs assigned to them. It is possible to propagate these private ASs through BGP.
JUNOS implements a mechanism to strip these private ASs from the AS_PATH, so they are not used or sent
further. To achieve this effect, use the remove-private statement. Table 9-38 shows the remove-
private configuration statement's syntax and the levels at which it can be configured.
Table 9-38. remove-private Configuration Statement
Syntaxremove-private;
Level 1, 2, 3, 4, 5, 6
trace-options
In JUNOS we can debug certain events by using the trace-options statement. This powerful feature allows
the user to view virtually all processes and functions of the BGP protocol, as well as other functions. This
information is especially valuable when troubleshooting session- and update-related problems in BGP. Table 9-
39 shows the trace-options configuration statement's syntax and the levels at which it can be configured.
www.ebook-converter.com
Table 9-39. trace-options Configuration Statement
Syntax Syntaxfile
traceoption {
name <replace> <size size> <files number>
<no-stamp> <(world
readable | no-world-readable)>;
flag flag <flag-modifier> <disable>;
}
Level 1, 2, 3, 4, 5, 6
type
In BGP there are two types of sessions that can be created. In the configuration, we use the type statement to
specify whether the session will be internal or external. Table 9-40 shows the type configuration statement's
syntax and the levels at which it can be configured.
Table 9-40. type Configuration Statement
Scaling BGP
391
9. BGP Routing Configuration
Now that the concepts and configuration of BGP have been covered, this section will show how to scale BGP
as the network grows. Consider that for each IBGP router in the full-mesh, the number of connections that
must be active per router is n – 1, where n is the total number of IBGP routers. If there are 30 routers in a
carrier core, each with 29 IBGP sessions running, there are a total of 435 IBGP sessions up at one time [n(n –
1)/2]. Assume that full tables need to be propagated throughout the entire AS, owing to architectural design
requirements. Add in several thousand customer routes, and, in short, a lot of data has to traverse your core
network just to cover the IBGP routing information. On top of that, you will have some IGP running in the
core, as well. That is quite a bit of in-band data, not to mention the complexity of having to troubleshoot the
platform and any potential instability issues. When BGP is scaled properly, the potential of an unstable routing
domain decreases, while the ease of overall management increases.
To assist in scaling to these design requirements, two techniques are used: route reflectors and confederations.
Route reflectors manipulate how IBGP sessions communicate with each other and eliminate the total number
of IBGP sessions required to propagate the same information. This is done through a reflector-client
relationship. Confederations, on the other hand, take what we know about BGP and allow the same type of
implementations, including route reflectors, to be used in smaller, more manageable, private ASs, combining
them all into a group of confederations. The real benefit to using route reflectors is that they assist in fixing
IBGP full-mesh scaling issues. They are easier to manage in smaller, more static networks. Confederations, on
the other hand, are a far superior approach and are very common in provider networks. They are inherently
more scalable than route reflectors, as well. Where route reflectors assist in managing the IBGP full-mesh,
confederations help to reduce the IBGP full-mesh and can also reduce the load on the IGP.
Route Reflectors
Route reflectors are typically implemented to reduce the overall cost of maintaining an IBGP full-mesh,
www.ebook-converter.com
allowing for scalability to greater proportions. One of the rules in IBGP is that no IBGP router shall advertise
routes previously learned from an IBGP neighbor. This works, because each IBGP router has a session to all
other IBGP routers (full-mesh). Essentially, all IBGP peers have the same routers as neighbors.
We will refer to Figure 9-26 to discuss IBGP route propagation. We see in this figure that router San Francisco
advertises the prefix 172.17/16 to router Denver over an EBGP session. Router Denver is a border router
for the AS, so it will run both EBGP and IBGP sessions. Because IBGP is set up with a full-mesh relationship
to all other IBGP routers in the domain, it will, in turn, advertise the 172.17/16 prefix to both Washington
D.C. and Atlanta. Even though Denver and Atlanta do not have a physical link connecting them, they are
IBGP peers due to a logical connection provided by Washington D.C. and the IGP routing domain. Since this is
a full-mesh, Washington D.C. and Atlanta received the prefix from Denver. Atlanta will not readvertise to
Washington D.C. because of the previously discussed rule on IBGP route advertisements. However,
Washington D.C. and Atlanta will receive prefix information from their EBGP peers and will propagate this
information throughout the IBGP mesh, as well.
www.ebook-converter.com
Confederations
Use of confederations is the other common technique for scaling IBGP. Confederations are not as easy to
implement as route reflectors and take much time and analysis to implement successfully. However, due to
design restrictions or scaling opportunities, confederations may be the best solution. Confederations can be
used to enhance the overall simplicity of the AS routing domain. In ISP networks, confederations are by far the
preferred method of scalability.
Before we talk directly about confederations, let's look at some of the benefits. When you are dealing with a
large provider network or redesigning a large enterprise, confederations can be used to simplify a lot of
functions. For instance, the IGP can be better scaled. In a large network, it can sometimes be difficult to
manage an IGP's growth, regardless of the simplicity of the actual protocol. With confederations, you can scale
the IGP down into smaller, more manageable subdomains. These subdomains can take advantage of their BGP
connections to the rest of the AS confederations by advertising fewer routes, summarizing in more places, and
making routing easier to administer.
The main reason for using confederations is to scale the BGP implementation. BGP itself is a fairly easy
protocol to manage. However, as the BGP domain grows, it easily can become cumbersome. For the same
reasons confederations help an IGP scale, it will help BGP scale. You can reduce the number of advertised
prefixes within a single confederation AS, thus making routing simpler. The ability to segregate the network
addressing scheme into manageable portions becomes easier, as well. The IBGP full-mesh can also be reduced.
Some people hesitate to use confederations, perhaps because of a lack of understanding. Confederations work
www.ebook-converter.com
in the same way as BGP, for the most part. Aside from the special rules concerning confederations and route
advertisements, it is a lot like setting up small BGP domains.
Now that we have simplified things a bit, remember that confederations are used to help in scaling. Pay
attention when configuring for confederations. If this is done improperly, then the likelihood of making a
difficult situation worse is fairly certain. If you are lucky enough to get involved in a large network design from
the ground up, then you can take advantage of confederations from the start.
Working with confederations requires using EBGP inside an AS. Confederation EBGP sessions are created
between each sub-AS boundary router. In addition to the use of EBGP between sub-AS boundary routers, two
new path attributes are introduced: AS_CONFED_SEQUENCE and AS_CONFED_SET. Both of these new
attributes are defined in RFC 3065. AS_CONFED_SEQUENCE is the ordered set of member ASNs in the local
confederation that the UPDATE message has traversed; AS_CONFED_SET is the unordered set of member
ASNs in the local confederation that the UPDATE message has traversed. These are used in the same manner as
the AS_SET and AS_SEQUENCE; however, their information relates to the confederations. These attributes are
removed prior to sending route information externally from the confederation AS (see Figure 9-28).
Chapter Summary
In this chapter you have learned the fundamentals of BGP. During our discussion, you should have become
familiar with the various topologies, homing, and the difference between transit and nontransit.
www.ebook-converter.com
The routing section covered details of the RIB and how BGP routes relate to the three types of RIB. In
addition, we covered the various routing tables JUNOS uses and how route preference and JUNOS BGP path
selection work to create active routes.
With the coverage of the FSM, we are now familiar with the six states of a BGP session:
1. Idle
2. Connect
3. Active
4. OpenSent
5. OpenConfirm
6. Established
Bibliography
www.ebook-converter.com
www.ebook-converter.com
www.ebook-converter.com
Path Selection with RID
We will first look at some common examples of route selection. In this scenario, the Washington D.C. router is advertising the
172.18.0.0/16 network to both Atlanta and Denver, who in turn advertise the prefix to their neighbors. When the prefix
advertisement reaches the Houston router, Houston must select a path, based upon our previous discussion on route selection in
Section 9.1.4.4.
When we issue the show route 172.18.0.0 detail command, we see the output in the example below. Path selection
has gone through each step in the route-selection process. To outline briefly, LOCAL_PREF is equal (at 100) for each route
received. When the comparison of AS_PATH length is processed, they are equal. They both have a path list of two ASs each, and
the ORIGIN is set to I for each, meaning that the route was learned in the originating AS by the IGP. Since Houston is learning
the prefix 172.18.0.0/16 from two internal neighbors, there will be no advertisement of the MED attribute. Both of these
routes were learned via IBGP peering sessions, so there is no comparison of EBGP-learned routes to be accepted over IBGP-
learned routes. Also, there is no IGP metric associated with these links because both border routers are directly connected to the
Houston router. When the route reaches the RID comparison, we finally have a difference. The RID assigned to Dallas is
192.168.12.1, and the RID assigned to San Francisco is 192.168.16.1. Since Dallas has the lower of the two RIDs, it will
be selected as the active route. If you look at the output from San Francisco, 192.168.16.1, you will see Inactive
399
10. BGP Routing Case Studies
172.18.0.0/16 (2 entries, 1 announced)
*BGP Preference: 170/-101
Source: 192.168.12.1
Nexthop: 10.0.13.2 via fe-0/1/0.0, selected
Protocol Nexthop: 10.0.8.1 Indirect nexthop: 83784c8 37
State: <Active Int Ext>
Local AS: 600 Peer AS: 600
Age: 13:19 Metric2: 20
Task: BGP_600.192.168.12.1+179
Announcement bits (2): 0-KRT 4-Resolve inet.0
AS path: 400 100 I
Localpref: 100
Router ID: 192.168.12.1
www.ebook-converter.com
Path Selection with AS_PATH
In the example below, we see the show route 172.18.0.0/16 detail output from the Denver router. Denver knows about
the 172.18.0.0/16 prefix from both Washington D.C. and Atlanta. The link between Denver and Washington D.C. is chosen
as the active route because the AS_PATH length is shorter than that for Denver to Atlanta to Washington D.C. The highlighted
portions of the output reinforce this.
lab@denver> show route 172.18.0.0/16 detail
www.ebook-converter.com
Age: 1:19:05
Task: BGP_400.10.0.8.1+1060
Announcement bits (3): 0-KRT 3-BGP.0.0.0.0+179 4-Resolve inet.0
AS path: 400 100 I
Localpref: 100
Router ID: 192.168.5.1
www.ebook-converter.com
172.18.0.0/16 *[BGP/170] 00:44:08, localpref 100
AS path: 700 100 I
> to 10.0.0.1 via fe-0/1/0.0
[BGP/170] 00:00:23, localpref 100
AS path: 100 100 I
> to 10.0.2.1 via fe-0/1/2.0
[BGP/170] 00:00:23, localpref 100
AS path: 600 700 100 I
> to 10.0.8.2 via fe-0/1/1.0
When we issue the show route 172.18.0.0/16 detail command, we see why the new route is preferred. The last route
in the table fails because of AS_PATH length. The second route is not active because it loses out in the RID comparison.
lab@Atlanta> show route 172.18.0.0/16 detail
inet.0: 9 destinations, 9 routes (8 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
for prefix 172.18.0.0/16 through Houston, then to San Francisco, then to Denver, and finally off to Washington D.C.,
whereas before the prepending took place, Dallas would have sent traffic for 172.18.0.0/16 to Atlanta, and Atlanta would
have sent it directly to Washington D.C.
lab@dallas> show route 172.18.0.0
www.ebook-converter.com
LOCAL_PREF and IGP Metric
Let's first look at how the border router, Denver, interprets the route advertisements. In the following example, we have the
output of show route protocol bgp. We use this command, since we are only injecting two routes into BGP. We could
also cover all of these routes with the show route 172.0.0.0/13 command. We see that Denver received the
172.1.0.0/16 network advertisement from AS100 and AS400. The active route is through the shorter AS_PATH list due from
AS100, which is what we expect to see.
lab@dallas> show route protocol bgp
404
10. BGP Routing Case Studies
Next, we issue the show route protocol bgp on border router Dallas. Dallas will get to network 172.1.0.0 via border
router Denver. For network 172.4.0.0/16, Dallas will send to AS400 out the directly connected interface.
lab@denver> show route protocol bgp
www.ebook-converter.com
172.4.0.0/16 (2 entries, 1 announced)
*BGP Preference: 170/-101
Source: 192.168.0.1
Nexthop: 10.0.16.2 via fe-0/1/1.0, selected
Protocol Nexthop: 10.0.0.2 Indirect nexthop: 83786e8 41
State: <Active Int Ext>
Local AS: 600 Peer AS: 600
Age: 37:56 Metric2: 20
Task: BGP_600.192.168.0.1+179
Announcement bits (2): 0-KRT 4-Resolve inet.0
AS path: 400 I
Localpref: 100
Router ID: 192.168.0.1
Task: BGP_600.192.168.12.1+179
AS path: 400 I
Localpref: 100
Router ID: 192.168.12.1
405
10. BGP Routing Case Studies
Now that we have a grasp on how the typical routing scenario works, we will set our LOCAL_PREF attribute on Denver to cause
it to be the preferred point of egress to reach the 172.4.0.0/16 network and set the LOCAL_PREF on Dallas to cause it to be
the preferred point of egress to reach the 172.1.0.0/16 network. This is not the most optimal way to route traffic, given this
topology, but it serves the purpose of showing how LOCAL_PREF will affect routing and, potentially, how it could be misused.
Now, if we take a look at the routing table from Dallas to network 172.4.0.0/16, we see that the active route is now going
through the Denver border router.
lab@dallas> show route 172.4.0.0/16
www.ebook-converter.com
[BGP/170] 01:05:10, localpref 100
AS path: 100 I
> to 10.0.1.1 via fe-0/1/2.0
[BGP/170] 01:05:06, localpref 100
AS path: 400 100 I
> to 10.0.0.2 via fe-0/1/0.0
Again, these are not the most optimal routing scenarios, which is all the more reason to pay close attention when manipulating
LOCAL_PREF to change the routing characteristics of your AS.
NEXT_HOP
We will now take a look at the NEXT_HOP attribute and how it works in an operational environment. When we speak about the
term next-hop in routing, especially when BGP is involved, we can be talking about two different subjects. First, there is the next-
hop that most people are familiar with, that being the next-hop to send a packet to. Basically a next-hop identifies an address and
an egress interface. The second next-hop is a bit more involved as we are referring to protocol next-hop. This is important because
BGP will need to be able to resolve this next-hop, which is the NEXT_HOP attribute. In order for BGP to install a route into the
routing table, it must be able to do a recursive lookup to the routing table and resolve the address in the NEXT_HOP attribute. If
the address in the NEXT_HOP attribute cannot be resolved, then the route will not be installed into the routing table. When a route
www.ebook-converter.com
172.16.16.0/24 *[BGP/170] 01:15:10, MED 0, localpref 100
AS path: 200 I
> to 10.0.2.2 via fe-0/1/0.0
The next example shows the same route with the show route 172.16.16.0 extensive command on Washington D.C.
You can see that the NEXT_HOP advertised was 10.0.2.2, which is exactly how BGP works. The advertising router Atlanta is
sending itself as the NEXT_HOP. The output will vary between EBGP and IBGP sessions. We will show this over the next few
examples.
lab@DC> show route 172.16.16.0 extensive
inet.0: 20 destinations, 20 routes (19 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.16.0/24 (1 entry, 1 announced)
TSI:
KRT in-kernel 172.16.16.0/24 -> {10.0.2.2}
Page 0 idx 0 Type 1 val 8382d20
Nexthop: 10.0.2.2 (this is the attribute NEXT_HOP)
MED: 0
407
10. BGP Routing Case Studies
Communities:
Path 172.16.16.0 from 10.0.2.2 Vector len 4. Val: 0 1
www.ebook-converter.com
10.0.2.0/24 *[OSPF/10] 00:19:12, metric 20
> to 10.0.24.1 via fe-0/1/1.0
10.0.24.0/24 *[Direct/0] 1w1d 00:03:15
> via fe-0/1/1.0
10.0.24.2/32 *[Local/0] 1w1d 00:03:15
Local
172.16.16.0/24 *[BGP/170] 00:32:47, MED 0, localpref 100, from 1.1.1.1
AS path: 200 I
> to 10.0.24.1 via fe-0/1/1.0
The example below shows the show route 172.16.16.0 extensive command. About halfway through the listing you
see Nexthop: 10.0.24.1 via fe-0/1/1.0, and immediately following, you see Protocol Nexthop: 10.0.2.2.
This last part is the actual NEXT_HOP attribute being passed. It also indicates that it is an indirect next-hop, which should clue you
in on the contents. This is where it all comes together. BGP passes the NEXT_HOP attribute, which is the border router
10.0.2.2. The reason that we are able to see this route as the active route is that BGP was able to resolve the NEXT_HOP
attribute in the IGP, which is 10.0.2.0/24. Taking a close look at this, we see that the route 10.0.2.0 uses a gateway
address of 10.0.24.1.
lab@NewYork> show route 172.16.16.0 extensive
408
10. BGP Routing Case Studies
*BGP Preference: 170/-101
Source: 1.1.1.1
Nexthop: 10.0.24.1 via fe-0/1/1.0, selected
Protocol Nexthop: 10.0.2.2 Indirect nexthop: 83785d8 43
State: <Active Int Ext>
Local AS: 100 Peer AS: 100
Age: 27:05 Metric: 0 Metric2: 20
Task: BGP_100.1.1.1.1+179
Announcement bits (2): 0-KRT 4-Resolve inet.0
AS path: 200 I
Localpref: 100
Router ID: 1.1.1.1
Indirect nexthops: 1
Protocol nexthop: 10.0.2.2 Metric: 20 Indirect nexthop: 83785d8 43
Indirect path forwarding nexthops: 1
Nexthop: 10.0.24.1 via fe-0/1/1.0
Next, we will see what happens when we remove the 10.0.2.0/24 network from our IGP. Looking at the routing table for
Washington D.C., we see that nothing has changed and that we still see the route. This is because the NEXT_HOP that needs to be
resolved is a directly connected network, and thus the recursive lookup will be successful.
lab@DC> show route 172.16.16.0
inet.0: 20 destinations, 20 routes (19 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.16.0/24 *[BGP/170] 01:39:04, MED 0, localpref 100
AS path: 200 I
> to 10.0.2.2 via fe-0/1/0.0
However, if we take a look in the routing table for New York, we will not see the route. The route does not exist anymore, or does
www.ebook-converter.com
it?
lab@NewYork> show route 172.16.16.0
The next example shows the output from the show route 172.16.16.0 hidden extensive command. You can see the
route is here because it was advertised by BGP. However, BGP was unable to resolve the next-hop information because our IGP
knows nothing about the 10.0.2.0/24 network.
lab@NewYork> show route 172.16.16.0 hidden extensive
www.ebook-converter.com
We will first see what our routing table looks like when we have the IGP advertising the EBGP link between Washington D.C.
and Denver into AS200. In the Atlanta router, we see that the next-hop advertised in Protocol Nexthop: 10.0.1.2 can be
reached via Nexthop: 10.0.2.1 via fe-0/1/2.0 is because OSPF is running passively on interface fe-0/1/2.
lab@Atlanta> show route 172.16.0.0/16 detail
www.ebook-converter.com
then {
next-hop self;
}
}
}
The policy is implemented in our BGP session in the following way:
protocols {
bgp {
group IBGP {
type internal;
local-address 192.168.2.1;
export nexthop-self;
neighbor 192.168.5.1;
neighbor 192.168.12.1;
}
}
411
10. BGP Routing Case Studies
lab@Atlanta> show route 172.16.0.0/16 detail
inet.0: 15 destinations, 15 routes (14 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.0.0/16 (1 entry, 1 announced)
*BGP Preference: 170/-101
Source: 192.168.2.1
Nexthop: 10.0.2.1 via fe-0/1/2.0, selected
Protocol Nexthop: 192.168.2.1 Indirect nexthop: 8378550 23
State: <Active Int Ext>
Local AS: 200 Peer AS: 200
Age: 29:16 Metric2: 10
Task: BGP_200.192.168.2.1+179
Announcement bits (2): 0-KRT 4-Resolve inet.0
AS path: 100 I
Localpref: 100
Router ID: 192.168.2.1
This concludes the case study for next-hop. You have seen how next-hop applies to the interior and exterior of an AS and the
interpretation of each. You now know why the IGP is so important to BGP for recursive lookups and how the lack of routing
information in IGP can cause your BGP routes not to be installed. We can also overcome some obstacles of the recursive lookup
problem through implementation of nexthop-self policy.
MED
The MED attribute is used to tell a remote AS which links to prefer when sending traffic to the local AS. In this scenario, we will
refer to Figure 10-5. In this example, Renda's Travel Service uses MOMO ISP for Internet connectivity. Since Renda's Travel
Services is a nationwide operation, there are two major gateways: one in Los Angeles, California, and the other in Raleigh, North
Carolina. Everything east of the Mississippi comes into the Raleigh site, and everything west of the Mississippi comes into the Los
www.ebook-converter.com
Angeles site. Because of the 24-7 support that Renda's Travel Service provides to its customer base, there must be Internet
connectivity at all times.
MOMO ISP has assigned two blocks of address space to Renda's Travel Service. The travel service's network engineers utilize the
172.16.0.0/23 address space for the western region and 172.16.2.0/23 for the eastern region. In general terms, both Los
Angeles and Raleigh could advertise the entire address space equally with an advertisement of 172.16.0.0/22. This would tell
MOMO ISP to send the traffic for the entire address space to either location. Bandwidth is expensive, however, and we want to
provide the best use of the bandwidth for our client. Instead, we will have Los Angeles advertise 172.16.0.0/23 with a MED =
412
10. BGP Routing Case Studies
50 and 172.16.2.0/23 with a MED = 100.
In addition, we will have Raleigh do just the opposite: 172.16.0.0/23 with a MED = 100 and 172.16.2.0/23 with a MED =
50. With this we are telling MOMO to prefer the link between San Francisco and Los Angeles for the 172.16.0.0/23 address
space and the link between Washington D.C. and Raleigh for the 172.16.2.0/23 address space. MOMO does not have to do
anything with this MED value and can completely ignore it, but since we are a persistent integrator, we finally negotiate a policy
for MOMO to use our MED values. This setup also allows us a backup in case either the San Francisco or Los Angeles ISP links go
down.
ISPs and customers do not always “listen” to the MED value, mostly because there is potential for dishonesty in the use of the MED
value for manipulation of how the other side is going to pass traffic. In a well-negotiated environment, though, where the trust has
been built between the client and provider, use of this attribute can be very beneficial.
Now that we have laid some groundwork, let's see how it all works together. We will be looking at the routing table in router San
Francisco. Notice that there are two routes: one for the 172.16.0.0/23 network and another for the 172.16.2.0/23
network. Each of these is sent to San Francisco from Los Angeles with different MED values. With these settings, any traffic sent
to San Francisco destined for network 172.16.0.0/23 will be sent to Los Angeles. If traffic is destined for the
172.16.2.0/23 network, it will traverse the link from San Francisco to Washington D.C., then to Raleigh. If for some reason
there is a link failure between San Francisco and Washington D.C., then all traffic intended for the 172.16.2.0/23 network
would be sent to Los Angeles via San Francisco.
lab@SanFrancisco> show route 172.16.0.0/22
www.ebook-converter.com
> to 10.0.2.2 via fe-0/1/0.0
[BGP/170] 01:05:05, MED 100, localpref 100
AS path: 100 I
> to 10.0.24.2 via fe-0/1/1.0
Next, we have the routing table for Washington D.C. In this case, you can see just the opposite effect with the different networks.
The path information will switch.
lab@DC> show route 172.16.0.0/22
413
10. BGP Routing Case Studies
lab@SanFrancisco> show route 172.16.0.0/22
www.ebook-converter.com
Case Study 3: Load Balancing—Multipath and Multihop
JUNOS supports load balancing via three different methods:
1. EBGP load balancing using the multipath statement
2. IBGP load balancing using the multipath statement
3. EBGP load balancing using the multihop statement
We will cover the theory of each of these. This is an important topic due to the connected nature of most networks. Large-
enterprise networks have several connection points to the same or different ISPs, and ISPs themselves may have several
connection points to other peering ISPs.
Load balancing essentially means the sharing of multiple equal-cost paths over which to distribute outbound traffic. In Juniper
Networks routers, systems with the Internet Processor I ASIC can support up to 8 equal-cost paths, while systems with the
Internet Processor II ASIC can support up to 16 equal-cost paths.
To summarize, here are the three methods of load balancing:
414
10. BGP Routing Case Studies
EBGP Multipath
The first method of load balancing across multiple links between ASs using EBGP multipath is probably the most common. This is
because you may have scenarios where you have either links going to more than one AS receiving equal-cost routing information,
or multiple links going to multiple routers in the same AS receiving equal-cost routing information. We will take a look at both of
these.
Figure 10-6 shows a simple topology where AS400 is advertising the 172.16.0.0/16 network to both AS200 and AS300. In
turn, AS200 and AS300 advertise the same route to AS100. Assuming the link to AS200 and AS300 from AS100 is the same
speed, and AS100 has no desire to manipulate any of the attributes, AS100 now has two equal-cost paths to network
172.16.0.0/16.
Figure 10-6. Load Balancing Across Multiple Links Between ASs Using EBGP Multipath Scenario 1
Our second scenario for load balancing across multiple links between AS is similar to what we have just seen. Figure 10-7 shows
our new topology. In this situation, we still have a network advertisement coming from AS200 of 172.16.0.0/16, but the
advertisement to AS100 is coming from two routers in AS200. If the policy in AS200 were to modify the MED value to try to
manipulate the way AS100 sees the route, then it would not be a truly equal-cost path. However, with policy, AS100 can make the
www.ebook-converter.com
advertisement look the same and implement load balancing.
Figure 10-7. Load Balancing Across Multiple Links Between ASs Using EBGP Multipath Scenario 2
IBGP Multipath
Figure 10-8. Load Balancing Using IBGP and the multipath Statement Scenario 3
Recalling our discussion on BGP route selection, all things being equal, BGP will install the route from the router with the lowest
RID. In this case router San Francisco has the lowest RID, so BGP will select the route to 10.10.0.0/16 via next-hop
172.16.0.1. When BGP does a recursive lookup for the route 172.16.0.1, it will find that there are two equal paths in the
IGP for 172.16.0.1: one via Atlanta and one via Dallas. In this case, Washington D.C. will forward any packets destined for
10.10.0.0/16 equally over the links between Washington D.C. to Atlanta and Washington D.C. to Dallas. This does not
present a serious problem, unless of course our goal is to provide as much equal distribution of traffic through our network as
possible. With the inclusion of the multipath statement, we can manipulate how BGP sees the 10.10.0.0/16 prefix and
provide equal distribution of traffic.
Let's now take a look at how Washington D.C. will view the routes with multipath enabled. When Washington D.C. receives the
two routes, one with a next-hop of 172.16.0.1 and the other with 172.16.0.2, it will install both routes into the routing
table. This is because the multipath statement allows BGP to install multiple routes in the routing table as long as they are
equal in cost. In this case, when Washington D.C. does a recursive lookup for 172.16.0.1 and 172.16.0.2, it will see that
www.ebook-converter.com
the IGP has equal-cost routes to both next-hop addresses. Thus, it will override the RID rule and allow both BGP routes to be
installed. When this occurs, Washington D.C. will distribute traffic for prefix 10.10.0.0/16 over all four links leading to the
border routers.
This scenario is probably one of the least commonly used, but it does illustrate how multipath can be used to take advantage of
equal-cost paths.
EBGP Multihop
This next scenario concerns load balancing between two EBGP peering routers with multiple links. Previously, it was mentioned
that peering between EBGP peers is typically done using the physical interface addresses. This works in general and is the best
way to peer (via EBGP) when only one link exists. However, we want to be able to take advantage of the multiple links that are
there primarily for resiliency.
For this scenario, take a look at Figure 10-9. The topology shows Washington D.C. in AS100 with three links to New York in
AS200. For ease of understanding, we will only refer to links A and B for the time being.
AS100 and AS200 want to peer with each other through Washington D.C. and New York, respectively. In a typical EBGP peering
scenario using only one link, we would create an EBGP session between Washington D.C. and New York using the physical
interface addresses. However, in this case we want to maintain a higher level of resiliency and take advantage of the multiple
links. Why? There are two reasons. The first is to take advantage of the link redundancy in case of link failure; the second is to
take advantage of the second link to load-balance traffic.
The easiest way to do this is to create an EBGP session between AS100 and AS200 by using the loopback interfaces of each
router. To do this, we need to address two issues: loopback interface routing and EBGP TTL.
In IBGP, we are able to peer between two routers using the loopback interface because we have an IGP running in our AS that
www.ebook-converter.com
knows about all internal interfaces to the AS and provides routing information to each router within the routing domain. Thus,
there is a logical connection. In this scenario, however, there is no IGP running between AS100 and AS200, and we do not want
one. In order for Washington D.C. to know about the loopback interface address on New York, we must configure a static route
to the loopback address via link A and link B. We do the same thing in New York. We create two static routes to Washington
D.C.'s loopback interface address via link A and link B. With this accomplished, each router can now see the other's loopback
interface.
The second issue we need to overcome is the EBGP TTL. In EBGP the TTL is set to 1, so you have basically one hop to create
your BGP session. Through the use of the multihop statement, we can increase our TTL to 2 and create an EBGP session
between loopback interfaces.
Now that we have addressed our connectivity issues, we can explain our ability to take advantage of the two characteristics
provided by the links: redundancy against failure and multiple links for load balancing.
For EBGP session redundancy, we are peering between the two loopback interface addresses on each router: Washington D.C.
and New York. If link A fails, the characteristics of TCP will allow our BGP EBGP peering session, which uses TCP as a
transport protocol, to remain up over link B. As for load balancing, our EBGP peering session is between loopback interfaces.
When AS100 receives routes from AS200, Washington D.C. (in AS100) will do its recursive lookup to the routing table. In the
routing table, we have two equal-cost static routes pointing to the loopback interface's address on New York, thereby giving our
router two equal-cost paths over which to route traffic.
Downloader demo watermarks
What about link C? If we were to add an additional link between the two peers, we would only have to add an additional static
route to each router pointing to the neighbor's loopback interface address.
www.ebook-converter.com
interfaces {
fe-0/1/1 {
unit 0 {
family inet {
address 10.0.16.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.16.1/32;
}
}
}
}
routing-options {
static {
router-id 192.168.16.1;
autonomous-system 500;
}
protocols {
418
10. BGP Routing Case Studies
bgp {
group EBGP {
type external;
export static-routes;
neighbor 10.0.16.2 {
peer-as 100;
}
}
}
}
policy-options {
policy-statement static-routes {
from protocol static;
then accept;
}
}
The Boston and San Jose configurations are identical, except for the advertising addresses. The next two examples show their
configurations.
The configuration for Boston is listed here:
interfaces {
fe-0/1/0 {
unit 0 {
family inet {
address 10.0.29.1/24;
}
}
}
lo0 {
www.ebook-converter.com
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.28.1/32;
}
}
}
}
routing-options {
static {
route 172.16.6.0/24 receive;
}
router-id 192.168.28.1;
autonomous-system 600;
}
protocols {
bgp {
group EBGP {
type external;
export static-routes;
}
peer-as 100;
}
}
policy-options {
419
10. BGP Routing Case Studies
policy-statement static-routes {
from protocol static;
then accept;
}
}
The configuration for San Jose is listed here:
interfaces {
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.50.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.20.1/32;
}
}
}
}
routing-options {
static {
route 172.16.7.0/24 receive;
}
router-id 192.168.20.1;
autonomous-system 700;
www.ebook-converter.com
}
protocols {
bgp {
group EBGP {
type external;
export static-routes;
neighbor 10.0.50.2 {
peer-as 100;
}
}
}
}
policy-options {
policy-statement static-routes {
from protocol static;
then accept;
}
}
When using route-reflector designs, each route reflector must be part of the AS's IBGP full-mesh. Next, we list the configuration
www.ebook-converter.com
group EBGP {
type external;
neighbor 10.0.29.1 {
peer-as 600;
}
}
}
ospf {
area 0.0.0.0 {
interface lo0.0;
interface fe-0/1/1.0;
interface fe-0/1/0.0 {
passive;
}
}
}
}
Until now, we have seen nothing more than typical BGP configurations. We did deviate from the typical loopback address peering
for the IBGP neighbors in this study.
421
10. BGP Routing Case Studies
Washington D.C.'s configuration is listed below. The group RRCLIENTS contains the route-reflector configuration. We will be
using 192.168.2.1 as the cluster ID. This is also the loopback interface address and the RID. The cluster ID, you will recall, is
unique to each route-reflector cluster. It is used for loop detection. Essentially, a cluster will not accept routes that have its own
cluster ID in the prefix advertisement. In the [protocols bgp group RRCLIENT] hierarchy, we also specify our peers;
these will be Denver and Atlanta, our route-reflector clients.
interfaces {
fe-0/1/0 {
unit 0 {
family inet {
address 10.0.2.1/24;
}
}
}
fe-0/1/1 {
unit 0 {
family inet {
address 10.0.24.1/24;
}
}
}
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.1.1/24;
}
}
}
fe-0/1/3 {
unit 0 {
family inet {
www.ebook-converter.com
address 10.0.50.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.2.1/32;
}
}
}
}
routing-options {
router-id 192.168.2.1;
autonomous-system 100;
}
protocols {
bgp {
group RRCLIENTS {
422
10. BGP Routing Case Studies
group EBGP {
type external;
neighbor 10.0.50.1 {
peer-as 700;
}
}
group IBGP {
type internal;
local-address 192.168.2.1;
neighbor 192.168.24.1;
}
}
ospf {
area 0.0.0.0 {
interface all;
interface fe-0/1/3.0 {
passive;
}
}
}
}
This next example shows Denver's configuration. Denver is one of the two route-reflector clients. The configuration for the
peering session to the route reflection can be found under the [protocols bgp group RR] hierarchy. We also have Denver
injecting a route into the BGP protocol, so we can view what the route will look like in the routing tables. Denver also has an
external connection to AS500.
interfaces {
fe-0/1/1 {
unit 0 {
family inet {
www.ebook-converter.com
address 10.0.16.2/24;
}
}
}
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.1.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.0.1/32;
}
}
}
}
www.ebook-converter.com
Atlanta is the second route-reflector client. It only connects to Washington D.C. The configuration for Atlanta is below:
interfaces {
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.2.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.5.1/32;
}
}
}
}
}
Downloader demo watermarks
routing-options {
router-id 192.168.5.1;
autonomous-system 100;
protocols {
bgp {
group RR {
424
10. BGP Routing Case Studies
type internal;
local-address 192.168.5.1;
neighbor 192.168.2.1;
}
}
ospf {
area 0.0.0.0 {
interface lo0.0;
interface fe-0/1/2.0;
}
}
}
Now that we have covered the configurations, we will take a look at how it all works together. The focus here is on Washington
D.C., Denver, and Atlanta. In this situation, Denver is advertising a route 172.16.2.0/24 to Washington D.C. Washington
D.C. will receive this route and advertise it, as it should, to the external peers, internal nonclient peers, and internal client peers.
This differs from what we are used to with IBGP. When normal IBGP rules apply, Washington D.C. would not readvertise the
prefix 172.16.2.0/24 to either Denver or New York. Since route reflection uses a relaxed rule set, the route-reflector server is
able to make the necessary advertisements, so that the route can be propagated properly throughout the AS. The following output
is of the show route 172.16.2.0 detail command. There is nothing significant here indicating that this is a reflector-
client relationship. However, Washington D.C. will now advertise this route to Atlanta, New York, and San Jose.
lab@DC> show route 172.16.2.0/24 detail
inet.0: 20 destinations, 20 routes (19 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.2.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Source: 192.168.0.1
Nexthop: 10.0.1.2 via fe-0/1/2.0, selected
Protocol Nexthop: 192.168.0.1 Indirect nexthop: 83784c8 63
www.ebook-converter.com
State: <Active Int Ext>
Local AS: 100 Peer AS: 100
Age: 11:44 Metric2: 10
Task: BGP_100.192.168.0.1+179
Announcement bits (3): 0-KRT 1-BGP.0.0.0.0+179 4-Resolve inet.0
AS path: I
Localpref: 100
Router ID: 192.168.0.1
The next example is the same show route 172.16.2.0/24 detail from router New York. You can see that the
CLUSTER_LIST is 192.168.2.1. This is the cluster ID we assigned to the router Washington D.C. The Originator ID is
192.168.0.1. Router Washington D.C. adds the both of these to the prefix, before advertising it to another IBGP peer. If this
route were to somehow be advertised back into this same route-reflector cluster, the route reflector would see its own cluster ID
in this list and would not accept the advertisement. If the originator of a route receives a prefix with its RID as the Originator
ID of the prefix, the router will not accept the announcement.
lab@NewYork> show route 172.16.2.0/24 detail
inet.0: 18 destinations, 18 routes (17 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
425
10. BGP Routing Case Studies
State: <Active Int Ext>
Local AS: 100 Peer AS: 100
Age: 12:40 Metric2: 20
Task: BGP_100.192.168.2.1+179
Announcement bits (3): 0-KRT 1-BGP.0.0.0.0+179 2-Resolve inet.0
AS path: I <Originator>
Cluster list: 192.168.2.1
Originator ID: 192.168.0.1
Localpref: 100
Router ID: 192.168.2.1
The following example shows the output for show route 172.16.2.0 on Atlanta. It has the same type of results as the
nonclient peer.
lab@Atlanta> show route 172.16.2.0/24 detail
inet.0: 17 destinations, 17 routes (16 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.2.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Source: 192.168.2.1
Nexthop: 10.0.2.1 via fe-0/1/2.0, selected
Protocol Nexthop: 192.168.0.1 Indirect nexthop: 8378550 58
State: <Active Int Ext>
Local AS: 100 Peer AS: 100
Age: 15:40 Metric2: 20
Task: BGP_100.192.168.2.1+179
Announcement bits (2): 0-KRT 4-Resolve inet.0
AS path: I <Originator>
Cluster list: 192.168.2.1
www.ebook-converter.com
Originator ID: 192.168.0.1
Localpref: 100
Router ID: 192.168.2.1
Next, we will take a look at the routes that are advertised into AS100 from our external neighbors. Our next example shows the
routing table for New York, looking for prefix 172.16.6.0/24 from Boston. There is nothing unusual about this route
advertisement. It is a typical EBGP-advertised route. We will not show Washington D.C.'s table for this as there is no change in
the route. The next-hop is shown to be New York.
lab@NewYork> show route 172.16.6.0/24 detail
inet.0: 18 destinations, 18 routes (17 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.6.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Source: 10.0.29.1
Nexthop: 10.0.29.1 via fe-0/1/0.0, selected
State: <Active Ext>
Local AS: 100 Peer AS: 600
426
10. BGP Routing Case Studies
Now we want to look at Denver's routing table. Here we see the Cluster list that was inserted by router Washington D.C.
and the Originator ID. The Originator ID is the border router that learned the external route—in this case, New York.
lab@Denver> show route 172.16.6.0/24 detail
inet.0: 18 destinations, 18 routes (17 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.6.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Source: 192.168.2.1
Nexthop: 10.0.1.1 via fe-0/1/2.0, selected
Protocol Nexthop: 10.0.29.1 Indirect nexthop: 8378550 46
State: <Active Int Ext>
Local AS: 100 Peer AS: 100
Age: 27:59 Metric2: 30
Task: BGP_100.192.168.2.1+1263
Announcement bits (3): 0-KRT 1-BGP.0.0.0.0+179 4-Resolve inet.0
AS path: 600 I <Originator>
Cluster list: 192.168.2.1
Originator ID: 192.168.24.1
Localpref: 100
Router ID: 192.168.2.1
Next, we see the routing table in route San Francisco. Notice that the Cluster list and Originator ID fields are no
longer in the advertisement. This is because these attributes will not traverse outside the AS in which the route reflector resides.
lab@SanFrancisco> show route 172.16.6.0/24 detail
inet.0: 12 destinations, 12 routes (11 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
172.16.6.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Source: 10.0.16.2
Nexthop: 10.0.16.2 via fe-0/1/1.0, selected
State: <Active Ext>
Local AS: 500 Peer AS: 100
Age: 31:29
Task: BGP_100.10.0.16.2+1383
Announcement bits (2): 0-KRT 1-BGP.0.0.0.0+179
AS path: 100 600 I
Localpref: 100
Router ID: 192.168.0.1
In this case study, we have seen the configuration necessary to implement route reflectors. We understand through this discussion
and our theory discussion in Section 9.5.1 how route reflectors can be used to scale BGP and further reduce the IBGP full-mesh
problem that can exist in large networks. We have also seen how loop-avoidance mechanisms are in place in route-reflector
scenarios, and how different announcements will affect which attributes will be passed to internal neighbors and external
neighbors. In the next case study, we will see how confederations can be used to scale BGP.
www.ebook-converter.com
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.20.1/32;
}
}
}
}
routing-options {
router-id 192.168.20.1;
autonomous-system 900;
}
protocols {
bgp {
group EBGP {
type external;
neighbor 10.0.21.1 {
}
Next, we have our configuration for AS300. Boston's configuration is similar to that of San Jose. In addition, Boston will be
428
10. BGP Routing Case Studies
injecting a route for the 172.16.0.0/16 network, which we will be tracking during this case study.
Interfaces {
fe-0/1/0 {
unit 0 {
family inet {
address 10.0.29.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.28.1/32;
}
}
}
}
routing-options {
static {
route 172.16.0.0/16 receive;
router-id 192.168.28.1;
autonomous-system 300;
}
protocols {
bgp {
group EBGP {
type external;
export static-routes;
neighbor 10.0.29.2 {
www.ebook-converter.com
peer-as 100;
}
}
}
}
policy-options {
policy-statement static-routes {
from protocol static;
then accept;
}
}
In the two previous configurations for San Jose and Boston, you will notice that the peer-as is AS100. This is because
ultimately the AS with the confederations will appear to the outside world as a single AS. We will see that a bit more when we see
the configurations for New York and San Francisco.
We will now look at our configuration for AS100. AS100 is our confederation AS and is comprised of three confederations, or
sub-ASs. The configuration for router New York is listed below. There exists a single EBGP connection between New York and
Boston. In the configuration for Boston, you will notice that under the [routing-options] hierarchy, we set the ASN to
65501. In addition, there is a statement reading confederation 100 members [ 65501 65504 65507 ]. The
www.ebook-converter.com
neighbor 192.168.2.1;
}
group EBGP {
type external;
neighbor 10.0.29.1 {
peer-as 300;
}
}
}
ospf {
area 0.0.0.1 {
interface lo0.0;
interface fe-0/1/1.0;
interface fe-0/1/0.0 {
passive;
}
}
}
}
430
10. BGP Routing Case Studies
members or potential customers, the use of the multihop statement and loopback address peering would be recommended.
Peering with the use of the multihop statement is covered in the load-balancing case study in Section 10.3.
As mentioned earlier, we are running OSPF for our IGP. Between all the boundary routers, we are running area 0.0.0.0, and
within sub-AS 65501 we use area 0.0.0.1. Thus, we see our configuration for OSPF has interfaces fe-0/1/0 and fe-0/1/2
in area 0.0.0.0 and fe-0/1/1 in area 0.0.0.1.
interfaces {
fe-0/1/0 {
unit 0 {
family inet {
address 10.0.2.1/24;
}
}
}
fe-0/1/1 {
unit 0 {
family inet {
address 10.0.24.1/24;
}
}
}
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.1.1/24;
}
}
}
lo0 {
unit 0 {
www.ebook-converter.com
family inet {
address 127.0.0.1/32;
address 192.168.2.1/32;
}
}
}
}
routing-options {
router-id 192.168.2.1;
autonomous-system 65501;
confederation 100 members [ 65501 65504 65507 ];
}
protocols {
bgp {
group IBGP {
type internal;
local-address 192.168.2.1;
neighbor 192.168.24.1;
}
group CEBGP {
www.ebook-converter.com
}
}
}
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.1.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.0.1/32;
}
}
}
}
routing-options {
www.ebook-converter.com
family inet {
address 10.0.21.1/24;
}
}
}
fe-0/1/1 {
unit 0 {
family inet {
address 10.0.16.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.16.1/32;
}
}
}
}
Downloader demo watermarks
routing-options {
router-id 192.168.16.1;
autonomous-system 65507;
confederation 100 members [ 65501 65504 65507 ];
}
protocols {
433
10. BGP Routing Case Studies
bgp {
group IBGP {
type internal;
local-address 192.168.16.1;
neighbor 192.168.0.1;
}
group EBGP {
type external;
neighbor 10.0.21.2 {
peer-as 900;
}
}
}
ospf {
area 0.0.0.7 {
interface lo0.0;
interface fe-0/1/1.0;
interface fe-0/1/0.0 {
passive;
}
}
}
}
Next is sub-AS 65504. Atlanta is the sub-AS boundary router and has EBGP peering sessions with Washington D.C. and Denver.
In addition, Atlanta takes part of an IBGP full-mesh within the sub-AS by peering with Dallas and Houston via IBGP. OSPF is
running in area 0.0.0.0 on interfaces fe-0/1/0 and fe-0/1/2. Area 0.0.0.4 is being used on interface fe-0/1/1.
interfaces {
fe-0/1/0 {
unit 0 {
www.ebook-converter.com
family inet {
address 10.0.0.2/24;
}
}
}
fe-0/1/1 {
unit 0 {
family inet {
address 10.0.8.1/24;
}
}
}
fe-0/1/2 {
unit 0 {
family inet {
address 10.0.2.2/24;
}
}
}
lo0 {
www.ebook-converter.com
interface fe-0/1/1.0;
}
}
}
Dallas' configuration is shown next. Dallas is part of the IBGP full-mesh with Atlanta and Houston. OSPF area 0.0.0.4 is
running on interfaces fe-0/1/0 and fe-0/1/1.
interfaces {
fe-0/1/0 {
unit 0 {
family inet {
address 10.0.13.2/24;
}
}
}
fe-0/1/1 {
unit 0 {
family inet {
address 10.0.8.2/24;
unit 0 {
family inet {
address 127.0.0.1/32;
435
10. BGP Routing Case Studies
address 192.168.12.1/32;
}
}
}
}
routing-options {
router-id 192.168.12.1;
autonomous-system 65504;
confederation 100 members [ 65501 65504 65507 ];
}
protocols {
bgp {
group IBGP {
type internal;
local-address 192.168.12.1;
neighbor 192.168.5.1;
neighbor 192.168.8.1;
}
}
ospf {
area 0.0.0.4 {
interface fe-0/1/1.0;
interface fe-0/1/0.0;
interface lo0.0;
}
}
}
Houston is running in the IBGP full-mesh with Atlanta and Dallas, and OSPF area 0.0.0.4 on interface fe-0/1/0.
interfaces {
www.ebook-converter.com
fe-0/1/0 {
unit 0 {
family inet {
address 10.0.13.1/24;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
address 192.168.8.1/32;
}
}
}
}
routing-options {
router-id 192.168.8.1;
www.ebook-converter.com
inet.0: 26 destinations, 26 routes (24 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
Protocol Nexthop: 10.0.29.1 Indirect nexthop: 83784c8 56
State: <Active Int Ext>
Local AS: 65507 Peer AS: 65501
Age: 2:11:32 Metric2: 3
Task: BGP_65501.10.0.1.1+179
Announcement bits (3): 0-KRT 1-BGP.0.0.0.0+179 2-Resolve inet.0
AS path: (65501) 300 I
Localpref: 100
Router ID: 192.168.2.1
Our next example shows the routing table from Atlanta. Our concerns are the same as they were when looking at Denver. In
addition, we see that Atlanta has two routes to the destination 172.16.0.0/16. Because of the way confederations work with
next-hop, the next-hop is retained. This is a perfect example of some different routing information you may see.
Let's step through this. Atlanta receives a route for 172.16.0.0/16 from Washington D.C. and Denver. The path list from
Washington D.C. is AS path: (65501) 300 I. The path list from Denver is AS path: (65507 65501) 300 I. You
would naturally believe Denver was the longer path, but it's not in terms of how BGP sees it. Each path, in this case, consists of
valid AS_PATH information with ASNs and Confed_Sequence. Going back to our path-selection discussion in Section 9.5.2,
we know that Confed_Sequence is given a value of 0 when being evaluated. Thus, the resulting value of the AS_PATH
attribute from Washington D.C. and Denver is 1. Ultimately, the prefix advertisement is chosen based upon the RID. Denver
438
10. BGP Routing Case Studies
lab@Atlanta> show route 172.16.0.0/16 detail
inet.0: 23 destinations, 23 routes (22 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.0.0/16 (2 entries, 1 announced)
*BGP Preference: 170/-101
Source: 10.0.0.1
Nexthop: 10.0.2.1 via fe-0/1/2.0, selected
Protocol Nexthop: 10.0.29.1 Indirect nexthop: 83784c8 23
State: <Active Int Ext>
Local AS: 65504 Peer AS: 65507
Age: 2:21:27 Metric2: 30
Task: BGP_65507.10.0.0.1+179
Announcement bits (3): 0-KRT 1-BGP.0.0.0.0+179 4-Resolve inet.0
AS path: (65507 65501) 300 I
Localpref: 100
Router ID: 192.168.0.1
BGP Preference: 170/-101
Source: 10.0.2.1
Nexthop: 10.0.2.1 via fe-0/1/2.0, selected
Protocol Nexthop: 10.0.29.1 Indirect nexthop: 83784c8 23
State: <NotBest Int Ext>
Inactive reason: Router ID
Local AS: 65504 Peer AS: 65501
Age: 2:21:29 Metric2: 30
Task: BGP_65501.10.0.2.1+1309
AS path: (65501) 300 I
Localpref: 100
Router ID: 192.168.2.1
www.ebook-converter.com
The following output is the show route 10.0.29.1 command showing the next-hop as 10.0.2.1.
lab@Atlanta> show route 10.0.29.1
Task: BGP_100.10.0.21.1+179
100
Aggregation
In this case study, we will show how to perform route aggregation in JUNOS. We will use the topology shown in Figure 10-12.
The purpose of this case study is to show how aggregation occurs and to configure it in JUNOS. First, we will discuss the topology
as this will provide insight into aggregation for those unfamiliar with it.
www.ebook-converter.com
Figure 10-12. Route-Aggregation Case Study Topology
In this scenario, we have two routers that will be providing feeder routes: Boston and Dallas. Boston will announce networks
172.16.0.0/24 and 172.16.1.0/24, and Dallas will announce 172.16.2.0/24 and 172.16.3.0/24. The purpose of
this is to provide routes for New York to aggregate. In this study, aggregation is configured such that New York announces the
aggregate of 172.16.0.0/22 only if there is a contributing route in its own routing table.
The first two examples below show the configurations for Boston and Dallas, respectively. These are pretty basic and are only
used to get the routes into BGP. All of the routers in AS200 are in the IBGP mesh and use OSPF for the IGP.
routing-options {
static {
route 172.16.0.0/24 receive;
route 172.16.1.0/24 receive;
}
autonomous-system 200;
www.ebook-converter.com
policy-statement static-routes {
from protocol static;
then accept;
}
}
Next is the configuration for New York. This is where the aggregation will occur. New York receives the routes from Boston and
Dallas. The aggregate route is configured under the [routing-options] hierarchy. The active parameter tells JUNOS to
keep the route active only if there is a contributing route. We can force the route to stay in the table, but for now that is not
necessary.
Policy plays a major role here though. In the policy-statement announce, the term pass-agg tells JUNOS to filter on
the aggregate with which we are concerned. It is possible to have multiple aggregates for different address spaces defined,
especially on AS boundary routers; therefore, specifying the exact match criteria proves to be beneficial in exporting the correct
route. The second portion of the policy, the term filter-more-specific, tells JUNOS to filter the more specific routes and
reject them. This accomplishes our goal for getting the aggregate route advertised. There are times when you may wish to leak the
more specific routes, perhaps to influence traffic flow to a particular network. Leaking more specific route information can be a
useful way to attract more inbound traffic from a given upstream provider, as well. Either way, the more specific the information
advertised, the higher the risk of route flaps during unstable conditions. The tradeoff can only be measured on a case-by-case
basis.
Downloader demo watermarks
routing-options {
aggregate {
route 172.16.0.0/22 active;
}
autonomous-system 200;
441
10. BGP Routing Case Studies
}
protocols {
bgp {
group ibgp {
type internal;
local-address 2.2.2.2;
neighbor 3.3.3.3;
neighbor 5.5.5.5;
}
group ebgp {
type external;
export announce;
neighbor 10.0.24.1 {
peer-as 100;
}
}
}
}
policy-options {
policy-statement announce {
term pass-agg {
from {
protocol aggregate;
route-filter 172.16.0.0/22 exact;
}
then accept;
}
term filter-more-specific {
from {
route-filter 172.16.0.0/22 longer;
}
www.ebook-converter.com
then reject;
}
}
}
Next, we want to take a look at the routing table for Washington D.C. This is more to prove the theory of operation than anything
else. This next example shows the routing table prior to the aggregate-route policy being invoked.
lab@DC> show route protocol bgp
inet.0: 14 destinations, 14 routes (13 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.0.0/24 *[BGP/170] 00:18:06, localpref 100
AS path: 200 I
> to 10.0.24.2 via fe-0/1/1.0
172.16.1.0/24 *[BGP/170] 00:18:06, localpref 100
AS path: 200 I
> to 10.0.24.2 via fe-0/1/1.0
172.16.2.0/24 *[BGP/170] 00:18:06, localpref 100
www.ebook-converter.com
term pass-agg {
from {
protocol aggregate;
route-filter 172.16.0.0/22 exact;
}
then accept;
}
term specific-pass-filter {
from {
route-filter 172.16.3.0/24 exact accept;
route-filter 172.16.0.0/22 orlonger;
}
then reject;
}
}
Next you can see Washington D.C.'s routing table, which proves our concept.
lab@DC> show route protocol bgp
www.ebook-converter.com
then accept;
}
term filter-more-specific {
from {
route-filter 172.16.0.0/22 longer;
}
then reject;
}
}
}
This concludes our case study on aggregate routes. You should now understand the basic concept of aggregation and how to
configure it in JUNOS. Remember, when configuring aggregates, take into account the effect you will be having on any subset of
routes that fall under the aggregate. Aggregation, while a useful tool, can cause undesired results if not implemented properly.
Chapter Summary
As this chapter comes to a close, so does this book's discussion of BGP and interdomain routing. The case studies in this chapter
are a foundation for further exploration into the BGP protocol and JUNOS implementation.
www.ebook-converter.com
www.ebook-converter.com
Hence, there are two types of routing policies that reflect control over incoming and outgoing routing information:
1. Import policy—. contains criteria governing routing information entering the routing table as it is received from
another protocol or neighbor
2. Export policy—. contains criteria governing route information leaving the routing table either to be sent to a
neighboring router or redistributed to another protocol
Figure 11-1 illustrates these policies. INET's router receives routes from Telco123's autonomous system boundary router,
but before the routes are put in the routing table, they are passed through whatever input policies have been configured
on INET's autonomous system boundary router.
Figure 11-2. Policy Applied to Routes Coming into a Large ISP from Smaller ISPs
www.ebook-converter.com
Policies can be used to establish a list of trusted systems that you will allow updates from. They give a high degree of
control over what information is passed to and from a router's routing tables, and they serve in an administrative capacity
where route parameters, such as metric and preference, can be modified.
For example, in Juniper Networks M-Series routers, regular expressions and BGP route flap damping (both of which will
be covered in this chapter) are implemented in JUNOS through routing policies. Tools such as these assist a network
engineer in providing optimum stability in a network and ensure that the routing information passing between routers is
expressly permitted. This is where policy comes into its own as a policing tool.
To ensure that policies can be applied on routers from different manufacturers, RPSL was created. Operators use this
language to share knowledge with other engineers about what policies are applied to each other. The following section
examines RPSL in more detail.
RPSL
In 1999 RPSL was designed to replace RIPE-181 [16], the first common language widely deployed in the Internet for
routing-policy definition. A new language was needed because operators found it hard to express policies used in practice
www.ebook-converter.com
UnixServer> whois -r 192.168.4.0
% This is the RIPE Whois server.
% The objects are in RPSL format.
% Please visit www.ripe.net/rpsl for more information.
% Rights restricted by copyright.
% See www.ripe.net/ripencc/pub-services/db/copyright.html
inetnum: 192.168.4.0 - 192.168.7.255
netname: customer1-net
descr: Telco123
descr: Unit 30a
descr: Littletown
country: Ireland
admin-c: XX3241-RIPE
tech-c: ABEC1-RIPE
rev-srv: ns1.ec.abxy.net
rev-srv: ns2.ec.abxy.net
status: ASSIGNED PA
mnt-by: INETEC-MNT
Downloader demo watermarks
changed:
source:
[email protected] 19991217
RIPE
route: 192.168.0.0/19
descr: INET EC Block 4
origin: AS65535
448
11. Defining and Implementing Routing Policies
mnt-by: INETEC-MNT
changed: [email protected] 19980513
changed: [email protected] 19990929
source: RIPE
role: INET Ireland IP-oper
address: INET – An Internet Company
address: bigstreet
address: Dublin
address: Ireland
phone: +353 99 233445
fax-no: : +353 99 233446
e-mail: [email protected]
trouble: [email protected]
admin-c: ANR13-RIPE
admin-c: OC855-RIPE
tech-c: BMS13-RIPE
tech-c: AND9-RIPE
tech-c: LBST4-RIPE
tech-c: EHU1-RIPE
tech-c: LBUJ1-RIPE
nic-hdl: BNEC1-RIPE
remarks: --------------------------------------------------------
remarks: For complaints about abusive/malicious behavior
remarks: please contact one of the following addresses:
remarks: E-mail abuse(SPAM/UCE): [email protected]
remarks: USENET/Newsgroup abuse: abuse-news@INET
remarks: Security/hacking/etc : [email protected]
remarks: All other issues : [email protected]
remarks: --------------------------------------------------------
www.ebook-converter.com
remarks: *** IF ABUSE IS GOING ON AT THIS VERY MOMENT ***
remarks: *** PLEASE CALL 919-555-1212,OPTION 2,3,1 Ask for RORO *
remarks: --------------------------------------------------------
notify: [email protected]
notify: [email protected]
mnt-by: INETEC1-MNT
changed: [email protected] 20010429
changed: [email protected] 20010602
source: RIPE
person: I. M. Responsible
address: Unit 30a
address: a street, Littletown
address: Ireland
phone: +353 11 361921
fax-no: +353 11 361736
e-mail: [email protected]
nic-hdl: XC6541-RIPE
mnt-by: INETEC1-MNT
Downloader demo watermarks
changed:
source:
lcr@19990416
RIPE
Table 11-1 describes the less intuitive fields returned from the previous whois network query.
More information about these fields can be obtained from www.ripe.net/ripe/docs/databaseref-manual.html.
449
11. Defining and Implementing Routing Policies
Table 11-1. whois Network Query Fields
Field
Information Displayed
Name
inetnumThe Internet address. In this example, 192.168.4.0 is actually part of an address space ranging from
192.168.4.0 to 192.168.7.255.
netnameThe name of the network. In this example, 192.168.4.0 is called customer1-net.
descr Who the network belongs to and where the company is located.
route Which block the range is from. In this example, the range is part of the 192.168.0.0/19 block.
mnt-by The name of the company that maintains the network.
changedAll changes to the entry, including when it was last changed and the e-mail address of the person who changed
it.
admin-cAdministrative contacts.
tech-c Technical contacts.
nic-hdlThe NIC handle.
remarksOptional fields for an operator to provide extra information.
If you do not have access to a UNIX box, then whois queries can be performed over the Web at numerous Web sites,
the main ones being the following:
RIPE—www.ripe.net/perl/whois
APNIC—www.apnic.org/apnic-bin/whois2.pl
InterNIC—www.internic.org/whois.html
Note that RPSL is not a router configuration language. It is an object-oriented language that permits the generation of a
router configuration from the description of a router combined with the description of an AS.
www.ebook-converter.com
When policy objects are registered in the IRR, they can also be queried using the whois service. Any public ASN in the
range of 1 to 64,511 can be queried. The block of ASNs from 64,512 to 65,535 are reserved for private use as defined in
RFC 1930. In the following example, we can see how the whois command can be adopted to query an entire AS. This
is, of course, a private ASN, but imagine the depth of publicly available data that is obtainable through a public AS query.
unixserver> whois -r as65535
% This is the RIPE Whois server.
% The objects are in RPSL format.
% Please visit www.ripe.net/rpsl for more information.
% Rights restricted by copyright.
% See www.ripe.net/ripencc/pub-services/db/copyright.html
www.ebook-converter.com
accept ANY AND NOT {0.0.0.0/0}
export: to AS65530
announce AS- AS-TELCO123
admin-c: ACBN1-RIPE
tech-c: ACBN1-RIPE
tech-c: ADAM1-RIPE
mnt-by: TELCO123-MNTNR
notify: [email protected]
changed: [email protected] 19990921
changed: [email protected] 20011014
source: RIPE
role: RIPE NCC Operations
address: OP Centre
address: BigCity
address: EC-Country
phone: +11 21 545 4321
fax-no: +11 21 545 4323
e-mail: [email protected]
Downloader demo watermarks
admin-c:
admin-c:
tech-c:
JMSD1-RIPE
DEL132-RIPE
DEL132-RIPE
tech-c: LX627-RIPE
tech-c: GM8331-RIPE
tech-c: MBLI3-RIPE
451
11. Defining and Implementing Routing Policies
tech-c: DL785-RIPE
tech-c: EQ4727-RIPE
tech-c: DN11627-RIPE
tech-c: MDS4-RIPE
tech-c: PW3458-RIPE
tech-c: JLSE2-RIPE
tech-c: LI2176-RIPE
nic-hdl: OPT5-RIPE
mnt-by: RIPE-NCC-MNT
changed: [email protected] 19991208
changed: [email protected] 20000803
changed: [email protected] 20001101
changed: [email protected] 20010308
changed: [email protected] 20010622
source: RIPE
www.ebook-converter.com
source: RIPE
person: RIPE Engineer
address: RIPE Network Coordination Centre (NCC)
address: OP Centre
address: BigCity
address: EC-Country
phone: +11 21 545 4321
fax-no: +11 21 545 4323
nic-hdl: MM43-RIPE
mnt-by: RIPE-NCC-HM-MNT
changed: [email protected] 20000805
changed: [email protected] 20010615
source: RIPE
In the example shown, a whois query is performed on AS 65535. Remember that this ASN belongs to INET. Most of the
fields contained in the output from the previous whois command are present here again.
The main fields we are concerned with here are the as-block, aut-num, as-name, import, and export fields.
Downloader demo watermarks
The as-block field tells us that AS 65535 belongs to a block of ASNs ranging from 64,512 to 65,535. The aut-num
field is the ASN that we queried. In this case, the AS is not named as the as-name field has returned a value of
UNSPECIFIED.
The import and export fields display the policies applied by AS 65535 on incoming and outgoing routes, respectively.
In the first set of import and export fields, you can see that AS 65535 has a policy in place to accept any route from
452
11. Defining and Implementing Routing Policies
AS 65534 as long as it is not a default route:
import: from AS65534
action pref=100;
accept ANY AND NOT {0.0.0.0/0}
export: to AS65534
The above excerpt describes the policy rules that AS 65535 has set for its peering interaction with AS 65534. We see that
on the import side from AS 65534, AS 65535 sets the preference value to 100. AS 65535 will accept all routes, except the
default 0.0.0.0/0 route. On the outgoing side, the export policy merely states that AS 65535 is to announce its
presence to AS 65534. This is an example of a typical policy entry in the RADB.
RFC 2650 [3], “Using RPSL in Practice,” is an informational RFC that fully describes the IRR and RPSL. There are a
number of tools available today to enable a routing configuration to be developed from information stored in the IRR.
One collection of tools is RAToolSet, which includes a configuration generator called Rtconfig that supports
configuration generation for Cisco, Juniper Networks, Nortel, Gated, and RSd routers with BGP policies. More
information on the RAToolSet can be found on the University of California Web site at www.isi.edu/ra/RAToolSet.
www.ebook-converter.com
Policy definition is carried out in configuration mode at the [edit policy-options] level of the JUNOS CLI.
Policies are defined by using the policy-statement command as follows:
[edit]
user@SanFrancisco# edit policy-options
[edit policy-options]
root@SanFran# set policy-statement policyname ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
> from Conditions to match a route's source
> term Policy term
> then Actions to take if 'from' and 'to' conditions match
> to Conditions to match a route's destination
After naming a policy, as shown above, you have the option of creating terms or defining a simple policy without terms.
The same concepts for configuration development presented in Section 6.3 on firewall filters apply here. Each policy
consists of zero or more terms with each term consisting of match conditions specified using a from or to statement and
www.ebook-converter.com
Each routing protocol has a certain default action that it performs when a routing policy is applied to it. As we have
discussed there are both import and export routing policies and if you have not explicitly configured a desired routing
policy then the defaults listed in Table 11-2.
When referring to this table keep in mind that Juniper Networks refers to directly connected and explicitly routes (ex.
Static) as pseudoprotocol routes since they do not originate from a specific routing protocol.
Table 11-2. Default Routing Policies
Imported/Exported
Default Import Policy Operation Default Export Policy Operation
Protocol
RIP Import all RIP routes learned from RIP will not export any routes by default. To export RIP routes,
configured neighbors into the you must configure an export policy.
inet.0 routing table.
RIPng Import all RIPng routes learned RIP will not export any routes by default. To export RIPng
from configured neighbors into the routes, you must configure an export policy.
inet6.0 routing table.
IS-IS Import all IS-IS routes into the Export all active IS-IS routes.
Downloader demo watermarks
inet.0 and inet6.0 routing
tables. (You cannot override or
change this default policy.)
Export all direct (interface) routes for the interfaces on
which IS-IS is explicitly configured.
OSPF OSPF Import all OSPF routes into Export all active OSPF routes.
the inet.0 routing table. (You
454
11. Defining and Implementing Routing Policies
Imported/Exported cannot override or change this Export all direct (interface) routes for the interfaces on
Default Import Policy Operation Default Export Policy Operation
Protocol default policy.) which OSPF is explicitly configured.
BGP Import all BGP IPv4 routes Export all active BGP routes.
learned from the routers
configured neighbors into the
inet.0 routing table.
Import all BGP IPv6 routes
learned from configured
neighbors into the inet6.0
routing table.
LDP Import all LDP routes into the Export all active LDP routes.
inet.3 routing table.
MPLS Import all MPLS routes into the Export all active MPLS routes.
inet.3 routing table.
DVMRP Import all DVMRP routes into the Export all active DVMRP routes.
inet.1 routing table.
PIM Dense Mode Import all PIM dense mode routes Export all active PIM dense mode routes.
into the inet.1 routing table.
PIM Sparse Mode Import all PIM sparse mode Export all active PIM sparse mode routes.
routesinto the inet.1 routing
table.
Pseudoprotocol Import all direct and explicitly Does not by default export any routes. The pseudoprotocol
Routes Include: configured routes into the inet.0 cannot export any routes from the routing table because it is
routing table. not a routing protocol, rather it is a collection of routes that
Direct routes fir into one of the listed categories.
www.ebook-converter.com
Explicitly
configured
routes:
Routing protocols can export these or any routes from the
routing table.
Aggregate
routes
Generated
routes
Static routes
Note
You cannot change the default import policy for the link-state protocols IS-IS and OSPF. As link-state
protocols, IS-IS and OSPF exchange routes between routers within an autonomous system (AS). All routers
Policy-Chain Terms
455
11. Defining and Implementing Routing Policies
A term is a segment of a policy designed to match routes against user-specified criteria and perform specific actions on
them once a match is made. A policy may have a single term, multiple terms, or none at all. Each policy can have specific
match actions within each term, as well as default actions outside of the terms. This concept is illustrated in Figure 11-4.
www.ebook-converter.com
the policy chain. This procedure continues for T terms in Policy 1 where T is a numeric integer defining the number of
terms in a policy. If Term T has been evaluated without a match, then the routes are passed to the next policy in the
chain, which in this case is Policy 2. Routes that do not match any policies in the chain through an accept action will be
rejected.
Not all policies or terms will have from, to, and then statements present. There are a number of rules to determine
what occurs if all or only some of these statements are present. This process is illustrated in Figure 11-5 and described
below.
The following default actions are taken if one of the following situations arise during policy evaluation:
If a policy does not specify a match condition, all routes evaluated against the policy match.
If a match occurs but the policy does not specify an accept, reject, next term, or next policy action, one of the
following occurs:
The next term, if present, is evaluated.
If no other terms are present, the next policy is evaluated.
Downloader demo watermarks
If no other policies are present, the action specified by the default policy is taken.
If a match does not occur with a term in a policy and subsequent terms in the same policy exist, the next term is
evaluated.
456
11. Defining and Implementing Routing Policies
If a match does not occur with any terms in a policy and subsequent policies exist, the next policy is evaluated.
If a match does not occur by the end of a policy or all policies, the accept or reject action specified by the default
policy is taken.
Match Conditions
Both from and to statements are made up of match conditions. There are many conditions that a route can be matched
against, which are divided into generic and protocol categories. As previously discussed, a protocol-specific match
condition, such as the OSPF area number, is considered to be a unique characteristic used by that protocol. A complete
list of the possible from statements is contained in the following example from the CLI:
www.ebook-converter.com
[edit]
user@Chicago# edit policy-options policy-statement my-new-policy
[edit policy-options policy-statement my-new-policy]
user@Chicago# set from ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
area OSPF area identifier
+ as-path Name of AS path regular expression (BGP only)
color Color (preference) value
color2 Color (preference) value 2
+ community BGP community
> external External route
instance Routing protocol instance
+ interface Interface name or address
level IS-IS level
local-preference Local preference associated with a route
457
11. Defining and Implementing Routing Policies
origin BGP origin attribute
+ policy Name of policy to evaluate
preference Preference value
preference2 Preference value 2
> prefix-list List of prefix-lists of routes to match
+ protocol Protocol from which route was learned
rib Routing table
> route-filter List of routes to match
> source-address-filter List of source addresses to match
tag Tag string
tag2 Tag string 2
Table 11-3 describes the each of the generic match conditions in more detail.
Table 11-3. Generic Match Conditions
Match
Description
Condition
color and Matches fine-grained preference values; often associated with BGP communities.
color2
external Matches external routes, including those exported from one level to another. A metric or type can be
specified. If a type is not specified, then all external routes are matched, but if a type is specified, then
the match will look for external type 1 or 2 routes, which are a feature of the OSPF protocol.
instance Matches routes coming from a specific protocol entity on the router.
interface Matches all routes learned via a specific interface. Do not use this with protocols that are not interface
specific, such as IBGP.
metric, Matches routes against four specifiable metric values. For BGP, metric corresponds to MED, and
metric2, metric2 corresponds to the IGP metric if the BGP next-hop traverses another route.
metric3,
www.ebook-converter.com
metric4
neighbor Matches routes from an OSPF or BGP neighbor or an IS-IS adjacency.
next-hop Matches routes tagged with a specific next-hop address.
policy Used to invoke routes that passed another policy. It saves having to rewrite policy statements.
preference Two preference values can be specified for a route. The preference2 value is used if there is a tie in
and the evaluation of the primary preference values. Also, color and color2 can be used as finer-grained
preference2 preference values.
protocol Matches against the protocol from which the route was learned.
rib Routes can be matched against a specific routing table. This defaults to the unicast routing table
inet.0 if a routing table is not specified, such as inet.1, inet.2, or mpls.0.
The following example shows a simple policy that rejects OSPF type 2 external routes:
policy-statement external-type2-reject {
from {
protocol ospf;
external {
type 2;
Downloader demo watermarks
}
}
then reject;
}
The next example shows a policy that could be used to change the metric of routes from a specific routing instance, in
458
11. Defining and Implementing Routing Policies
this case ospf2, assuming the router is running multiple instances of OSPF. ospf2 is the second instance of OSPF
routing configured on the router:
policy-statement routes-from-ospf2 {
from {
instance ospf2;
protocol ospf;
}
then {
metric 10;
accept;
}
}
Another example is a simple routing policy that matches all RIP routes, as follows:
policy-statement match-rip-routes {
from protocol rip;
then accept;
}
There are also protocol-specific match conditions for OSPF, IS-IS, and BGP. Table 11-4 lists and describes each of the
protocol-specific match conditions.
Table 11-4. Protocol-Specific Match Conditions
www.ebook-converter.com
community BGP Matches routes against one or more BGP communities
level IS-IS Matches routes based on the IS-IS router level as received
local- BGP Matches routes based on their BGP local preference value
preference
origin BGP Matches routes based on the source of the AS path information (IGP, EGP, or
incomplete)
tag and tag2 OSPF Matches routes against the contents of OSPF's external LSA 32-bit tag fields
Examples of the various BGP match conditions will be explored in greater depth later in the chapter and in Chapter 10.
Match Actions
After the match conditions in the from and to statements have been selected, it is then time to select a corresponding
match action for the policy. All match actions are specified as part of a then statement. As with match conditions, there
are many match actions. The possible match actions are listed below:
[edit policy-options policy-statement policyname]
www.ebook-converter.com
3.
Control actions govern the policy flow. These are the most fundamental match actions and the most frequently used.
Table 11-5 lists and describes each of the control actions.
Table 11-5. Control Actions
Match Description
Action
acceptThe matched route is accepted and no further matching is carried out.
rejectThe matched route is rejected and no further matching is carried out.
ext Skips ahead to the next policy. If an accept or reject action is not specified, and a match has occurred, then
policy this is the default action. If there are no further policies, a default policy action is taken.
next Skips to the next term. This is also default behavior if an accept or reject action is not specified in the term.
term If there are no further terms, then the next policy is evaluated, and if there are no further policies, a default
policy action is taken.
The trace action logs the match to a trace file. You will already have some information on trace files from Section
6.2.5.1, and more tracing examples will be explored in the next chapter. Trace file configurations appear at the routing-
Downloader demo watermarks
options level as follows:
routing-options {
traceoptions {
file matchactionlog replace size 640k files 5 no-world-readable;
flag policy;
460
11. Defining and Implementing Routing Policies
}
}
The remaining match actions fall under the general policy-actions category and are normally used to modify parameters
associated with a route. Table 11-6 lists each of these actions.
Table 11-6. General Policy Actions
www.ebook-converter.com
external Sets the external metric type of an OSPF route.
install- Used in conjunction with an MPLS LSP to specify which next-hops are installed in the routing table.
nexthop lsp
load- Installs all next-hop addresses in the forwarding table for the active route and performs per-packet load
balance-per- balancing.
packet
local- Sets a BGP local preference parameter for a route.
preference
metric Like from and to statements, comprises four possible metrics for each route: metric, metric2,
metric3, and metric4. The add and subtract options exist to modify existing metric options.
Otherwise, any existing metrics are overwritten.
anext-hop Sets the next-hop information for BGP. A common scenario where this is used is in the next-hop
self statement, which is used to replace the existing next-hop with the address of the local router.
origin Can be set to one of three values: igp, egp, or incomplete.
preference Associates a preference value with a route. By default, all routes will have their preference set
or based on protocol origin. Routes with the lowest preference are preferred. The preference2 value
preference2 serves as a tiebreaker if preference values are equal. Furthermore the color and color2 values can
be used for further granularity. As with the color and color2 actions, add and subtract options
Downloader demo watermarks
exist for both preference and preference2 to modify an existing preference. Otherwise any
existing preference values are overwritten.
tag and tag2Sets the tag and tag2 fields in OSPF external LSA packets. The add and subtract options are also
used to modify existing values in either of these fields.
In the following example, the AS path attribute of all routes received from BGP peer 10.0.0.1 will be prepended with
461
11. Defining and Implementing Routing Policies
"2 2 2 2", making these routes less attractive to BGP for inbound traffic, where 2 is the number of the local AS.
policy-options {
policy-statement as-path-prepend {
from neighbor 10.0.0.1;
then as-path-prepend “2 2 2 2”;
accept;
}
}
The next example enables damping with the options contained in lots-of-damping. The damping parameters for
lots-of-damping are specified in a separate section of policy. This will be examined in greater detail in Section 11.6.
policy-options {
policy-statement my-damp {
from neighbor 10.0.0.1;
then damping lots-of-damping;
}
The following example matches against routes coming from a specific next-hop 10.0.0.1 and going to OSPF area 3
while setting the preference value to 10.
policy-statement change-pref {
from next-hop 10.0.0.1;
to area 0.0.0.3;
then {
preference 10;
}
}
www.ebook-converter.com
Match conditions can be also specified using route filters. Route filtering is a method of picking out a route or specific
routes from the routing table and performing a common action on them. Route filtering will be examined in greater detail
later in this chapter.
DIET Policies
Earlier in the chapter we observed the similarity between a policy and a computer program. This concept will now be
explored further by applying a few computer program design rules. The first rule is that there are many ways to design, or
write, a computer program. Likewise, there are many different methods of policy composition. Often, if the syntax is
correct and the program or policy works, then you have achieved your goal. However, often elements of simplicity and
performance tend to fall by the wayside. It is important to design our policies in the most modular, scalable, and efficient
fashion possible. This makes our policies easier to parse, configure, and interpret.
We propose calling this the DIET policy design method. You may ask how this name was determined. Seeing as how the
fellow playing at being our manager while writing this book could stand to lose a few pounds, it was decided that the idea
of shedding excess weight could apply to policy as well. If you chuckled when you read this, then the likelihood is that
you will remember the four steps of policy dieting when needed and that you also had “one of those” kinds of managers!
2. Implement—. After applying good design practice, the policy must then be put to work. Implementing the policy in
JUNOS is key at this point. Though the policy has been configured, it has not yet been assigned to a routing protocol
or activated.
3. Execute—. Policy execution is the act of activating the policy by applying it to a specific routing policy.
4. Test—. The testing stage is the last phase. It is always good idea to verify that the policy functions as intended.
In the next section you will begin your policy creation using the DIET methodology. The objective will be to design
polices that are easy to understand and implement and that carry out the functions defined in the design stage.
Designing Policies
The world of computer programming has given us subroutines. Subroutines are a way of breaking down a complex
problem into smaller pieces so that each section can solve a subset of the overall problem, leading to a solution that is
easy to implement and understand. There are many reasons to break down a program into subroutines. Consider the
following from an online Perl programming guide by Emmie Lewis [13]:
Reduce complexity—Each subroutine represents a building block of the overall solution.
Facilitate modification—Future modification is easier if a program is divided into subroutines.
Hide order—Subroutines can be used to hide the order in which a program processes.
www.ebook-converter.com
Improve performance—There are fewer lines to compile and execute.
Hide complex detail—Programs are easier to read and understand.
Reuse parts of code—Once a subroutine is defined, it can be reused anywhere.
Now here's the same text again, but with the word “program” replaced with “policy” and the word “subroutine” with
“term”:
Reduce complexity—Each term represents a building block of the overall solution.
Facilitate modification—Future modification is easier if a policy is divided into terms.
Hide order—Terms can be used to hide the order in which a policy processes.
Improve performance—There are fewer lines to compile and execute.
Hide complex detail—Policies are easier to read and understand.
www.ebook-converter.com
policy-statement redistribute-isis {
term get-isis {
from protocol isis;
then accept;
}
}
This policy can be rewritten without a term statement as follows:
policy-statement redistribute-isis {
from protocol isis;
then accept;
}
Both policies have the exact same effect. The only difference between the two is that the explicit term definition was
dropped in the second example. The policy is called redistribute-isis and contains two statements. The from
protocol isis statement selects all IS-IS routes, which are in turn accepted with the accept statement.
Implementing Policies
After a policy has been designed, the next step is to implement it. All policies are implemented in the CLI under the
[edit policy-options] level of the hierarchy. There are a number of commands used to implement a policy. A
typical implementation could take the following three steps:
1. Assuming you are at the [edit] level of the CLI hierarchy, then enter the edit policy-options policy-
statement policy-name command, policy-1 being the chosen name of the policy. This will place you at the
[edit policy-options policy-statement policy-1] hierarchy level like so:
[edit]
user@Chicago# edit policy-options policy-statement policy-1
Terms can then be implemented within the policy. Under each term, match conditions are created using from and to
statements, while match actions are created using the then statement. Possible match actions and match conditions
have been described earlier in the chapter.
www.ebook-converter.com
Terms are created with match actions and match conditions. Match conditions for the from statement are created
using the set term term-name from match-condition command, where match-condition matches one
of the conditions observed earlier in the chapter, and term-1 is the chosen name of the term. For example:
[edit policy-options policy-statement policy-1]
user@Chicago# set term term-1 from protocol ospf
[edit policy-options policy-statement policy-1]
user@Chicago# show
term term-1 {
from protocol ospf;
}
The same concept applies to the to statement using a valid match condition described previously in this chapter. For
example:
[edit policy-options policy-statement policy-1]
user@Chicago# set term term-1 to neighbor 10.0.0.1
[edit policy-options policy-statement policy-1]
user@Chicago# show
Match actions for the then statement are created using the set term term-name then match-action
command, where match-action matches one of the possible actions described earlier in the chapter. For example:
465
11. Defining and Implementing Routing Policies
[edit policy-options policy-statement policy-1]
user@Chicago# set term term-1 then accept
2. Next, the second term can be implemented, and so on, to create the policy chain, as shown below:
[edit policy-options policy-statement policy-1]
user@Chicago# set term term-2 from protocol bgp
[edit policy-options policy-statement policy-1]
user@Chicago# set term term-2 to neighbor 10.0.0.2
[edit policy-options policy-statement policy-1]
user@Chicago# set term term-2 then metric 20
www.ebook-converter.com
then {
metric 10;
accept;
}
}
3. Lastly, it is a good idea to implement a default action term that contains only a then reject or then accept
statement. This catches everything that did not match the other terms and ensures that the final action is not being
left to system defaults. This final term is implemented using the set term finalterm then reject
statement, which leaves us with a complete policy as shown below:
[edit policy-options policy-statement policy-1]
user@Chicago# set term finalterm then reject
466
11. Defining and Implementing Routing Policies
term finalterm {
then reject;
}
The order in which policies are implemented under the [edit policy-options] hierarchy level does not matter; it
is the order of their execution that is important. The order in which terms are defined within a policy is also important.
Whenever the active configuration is being compiled by the routing engine, policies are read in the order in which they
are applied. Terms, however, are read from top to bottom (see Figure 11-5). Policies are executed term by term from top
to bottom unless another policy is called within a term.
There are two other methods of policy implementation that we have not mentioned yet. These include route filters and
regular expressions. Both are very important areas of policy implementation and will be covered in detail in subsequent
sections.
Executing Policies
Policies do not automatically take effect after implementation. Rather, they are executed after they are applied to the
appropriate routing protocol, such as RIP, IS-IS, OSPF, BGP, or Distance Vector Multicast Routing Protocol (DVMRP).
Earlier in the chapter we reviewed import and export policies. At this stage we must set the rules for policy application.
The primary rule is that we cannot set an import policy for IS-IS or OSPF, which would be detrimental to routing stability.
We can, however, set up import and export policies for BGP. A policy is executed using the set protocols
command under the [edit] hierarchy level of the CLI. Let us suppose that we have two other export policies, namely
policy-2 and policy-3, to apply under the BGP hierarchy level. This would appear in the configuration as follows:
[edit]
user@Chicago# set protocols bgp export [policy-1 policy-2 policy-3]
Extract from bgp configuration:
protocols {
bgp {
www.ebook-converter.com
}
export [ policy-1 policy-2 policy-3 ];
Order is very important here because we are creating a policy chain. Our chain is made up of three policies. First
policy-1 is evaluated and only if there are no matches in policy-1, policy-2 is evaluated. Again, if there are no
matches in policy-2, policy-3 is evaluated as the last step. The policy chain is read by the router from left to right
and is treated as an ordered list. Thus, policy-1 is applied and executed first, and so forth. The insert command can
be used to change the order in which policies are evaluated and has two options: before and after. The following
example illustrates its use:
[edit]
user@Chicago# show protocols bgp
export [ policy-1 policy-2 policy-3 ];
[edit]
user@Chicago# insert protocols bgp export policy-2 before policy-1
[edit]
467
11. Defining and Implementing Routing Policies
[edit]
user@Chicago# show protocols bgp
export [ policy-1 policy-3 policy-2 ];
In the above example we have modified the order in which the policies are executed by moving around policy-2.
Within BGP, import and export policies can be applied at three different levels:
1. Global level—. under the [edit protocols bgp] hierarchy level
2. Group level—. under the [edit protocols bgp group groupname] hierarchy level, where groupname is
the name of the BGP group
3. Neighbor level—. under the [edit protocols bgp group groupname neighbor neighbor-
address] hierarchy level, where neighbor-address is the address of the specific BGP neighbor that the policy
applies to
The general rule is that neighbor-level policies supercede group-level policies, and group-level policies take precedence
over global-level policies.
The next example shows a BGP configuration that includes two BGP peer groups, one for internal and one for external
peers. For the purpose of this example, we have specifically used private addresses and ASNs. It is important to note that
external peer addresses would usually be public addresses, that is addresses other that those reserved for private use as
specified in RFC 1918 [6]. There are three policies configured as follows:
1. global-bgp-policy—. only applies to the internal-peers group since the external-peers group
contains its own group policy, which overrides the global policy
2. group-policy—. only applies to neighbors 192.168.1.2 and 192.168.1.3 as neighbor 192.168.1.1
contains its own policy, which overrides the group and global policies
www.ebook-converter.com
3. special-policy—. only applies to neighbor 192.168.1.1 in the external-peers group and overrides
both group and global policies
[edit]
user@Chicago# show protocols bgp
export global-bgp-policy;
group external-peers {
type external;
export group-policy;
peer-as 65535;
neighbor 192.168.1.1 {
export special-policy;
}
neighbor 192.168.1.2;
neighbor 192.168.1.3;
}
group internal-peers {
Testing Policies
468
11. Defining and Implementing Routing Policies
After your policies have been designed, implemented, and executed, you are nearly finished with your policy DIET! The
last step is to test the policies. Aside from actual use and implementation, policies can be router tested in two ways:
1. Against a specific route using the test policy policy-1 a.b.c.d/e command
2. Against the entire unicast routing table inet.0 using the test policy policy-1 0.0.0.0/0 command
In the above commands, policy-1 is the name of the policy being tested, a.b.c.d/e is a specific route being tested,
and 0.0.0.0/0 signifies all the routes contained in the inet.0 routing table.
Through the use of the test policy command, it is possible to determine whether or not the policy implemented
meets the intended design criteria. Consider the simple network in Figure 11-7, which shows three routers: Washington
D.C., Chicago, and San Francisco. All routers are running OSPF and belong to backbone area 0. The 172.16.x/24
networks are static routes used to simulate attached customer networks. Table 11-7 lists the aggregate required on each
router to encompass each of the static routes.
www.ebook-converter.com
Table 11-7. Aggregate Routes
Router Aggregate
Washington D.C172.16.0.0/22
Chicago 172.16.4.0/22
San Francisco 172.16.8.0/22
The network is set up so that the aggregates are shared into OSPF through use of policy, while the specific networks are
not. This is achieved by means of a simple export policy named aggregate-2-ospf. The aggregate routes will be
accepted by this policy, while everything else will be rejected. As you review the configurations, notice that each policy
is applied as an export statement within OSPF before the actual policy is listed. The relevant pieces of the
configuration have been highlighted for you. Following are the configurations for each of the three routers.
1. Router Washington D.C. configuration:
[edit]
user@Chicago# show
469
11. Defining and Implementing Routing Policies
login {
user lab {
uid 2000;
class superuser;
authentication {
encrypted-password “$1$er32.$ZLaup5gYipIjmWcUmBMEr0”; #
SECRET-DATA
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
}
}
interfaces {
so-1/0/0 {
unit 0 {
family inet {
address 192.168.10.1/30;
}
}
}
so-1/0/1 {
unit 0 {
family inet {
address 192.168.30.2/30;
}
}
}
}
www.ebook-converter.com
routing-options {
static {
route 172.16.1.0/24 receive;
route 172.16.2.0/24 receive;
route 172.16.0.0/24 receive;
route 172.16.3.0/24 receive;
}
aggregate {
route 172.16.0.0/22;
}
}
protocols {
ospf {
export aggregate-2-ospf;
area 0.0.0.0 {
interface all;
}
}
}
policy-options {
policy-statement aggregate-2-ospf {
term match-aggregate {
www.ebook-converter.com
address 192.168.10.2/30;
}
}
}
so-2/0/1{
unit 0 {
family inet {
address 192.168.20.1/30;
}
}
}
}
routing-options {
static {
route 172.16.4.0/24 receive;
route 172.16.5.0/24 receive;
route 172.16.6.0/24 receive;
route 172.16.7.0/24 receive;
}
aggregate {
route 172.16.4.0/22;
}
}
www.ebook-converter.com
any emergency;
}
file messages {
any notice;
authorization info;
}
}
}
interfaces {
so-1/2/0 {
unit 0 {
family inet {
address 192.168.30.1/30;
}
}
}
so-1/2/1 {
unit 0 {
family inet {
address 192.168.20.2/30;
}
}
}
You can test the effect of the policies by issuing the show policy command on any of the three routers in the
example. As previously described, there are two ways of using the test policy command: testing against the entire
routing table or against a specific route. The following example uses the Washington D.C. router to test aggregate-2-
ospf against the aggregate route 172.16.0.0/22 and against all routes in the routing table. The output is as follows:
user@Chicago> test policy aggregate-2-ospf 172.16.0.0/22
www.ebook-converter.com
172.16.0.0/22 *[Aggregate/130] 03:34:06
Reject
473
11. Defining and Implementing Routing Policies
user@Chicago> show policy
Configured policies:
Aggregate-2-ospf
In the previous example, there is only one policy configured on the router. If you would like to see what is configured in a
policy, you can issue the show policy policy-name command, where policy-name is the name of the policy
you are examining. Issuing the show policy aggregate-2-ospf command shows the rules defined within the
policy as follows:
user@Chicago> show policy aggregate-2-ospf
Policy aggregate-2-ospf:
Term match-aggregate:
from proto Aggregate
then accept
Term reject-all-else:
then reject
Route Redistribution
www.ebook-converter.com
A common example is that you want to redistribute RIP routes into OSPF. You may also want to modify the metric on
the RIP routes prior to redistributing them. The resulting policy would look similar to the following:
policy-statement rip-2-ospf {
from protocol rip;
then {
metric 5;
accept;
}
}
}
ospf {
export rip-2-ospf;
}
In JUNOS, the BGP protocol often relies on having routes put into the protocol through a redistribution export
policy. It is common to redistribute OSPF or static routes into BGP so they are seen as IBGP routes. This can be achieved
www.ebook-converter.com
pim PIM
rip RIP
static Statically defined addresses
Sometimes when routes are being redistributed from one protocol to another, you might want to limit the routes to a
certain subset. Route filters were specifically designed for this purpose, as is discussed in the following section.
Route Filtering
Route filtering is a way of identifying a specific route or a group of routes and performing a common action on them.
Common actions include setting route metrics, preference values, or BGP communities. The ability to modify route
parameters increases the scalability of IP. By controlling routing parameters, such as metrics and protocol preferences,
network data paths can be customized at the discretion of the network administrator.
Route filtering is a very useful feature that enables a policy to be implemented in a number of stages. At each point,
specific groups of routes are selected and receive a set of actions. Actions may include the modification of metrics or
route rejection to deny routes from entering or passing through the network. Route rejection could be used to prevent a
neighboring AS from using the local network as a transit AS for nonlocal traffic that is not covered under a neighboring
www.ebook-converter.com
address. This address needs additional information in the form of a match type to determine if it matches or not. In
addition to the network address, one of the following match types is required:
[edit]
user@Chicago# set policyoptions policy-statement policyname from route-filter
192.168.1.0/24 ?
Possible completions:
exact Exactly match the prefix length
longer Mask is greater than the prefix length
orlonger Mask is greater than or equal to the prefix length
prefix-length-range Mask falls between two prefix lengths
through Route falls between two prefixes
upto Mask falls between two prefix lengths
It is possible to specify multiple route filters in a single from statement. In fact, this is standard practice. In the case of
multiple route filters matching a route within a from statement, a longest-prefix match rule applies. That is, the longest
match prevails over all other matches. Match actions can also be specified as part of the route-filter statement. If a
match action exists on the same line, then it overrules any match actions listed in the then portion of the policy. Some of
www.ebook-converter.com
then reject;
}
Damping is a process to subdue the problem of route flaps by providing a calculated method for the suppression of
UPDATE messages. Damping is typically implemented in exterior border routers to keep the flapping routes from being
injected into and withdrawn from the internal routing domain (IGP routing process). This type of implementation causes
minimal impact to the underlying AS routing domain.
Route flap damping devises a mechanism whereby the unstable routes are penalized for their volatility. The goals of BGP
route flap damping are defined and outlined in RFC 2439 [4] as follows:
To provide a mechanism capable of reducing router processing load caused by instability
www.ebook-converter.com
To prevent sustained routing oscillations
To avoid sacrificing route convergence time for generally well-behaved routes
RFC 2439 outlines a number of parameters that should be used to implement route flap damping.
JUNOS implements damping in accordance to RFC 2439. The configurable parameters (default values listed in
parentheses) are as follows:
half-life decay (15 minutes)—the time used to compute the rate of decay of the figure of merit
max-suppress threshold parameters (60 minutes)—the maximum number of minutes that the route can be
suppressed without reinstalling the prefix in the route table and starting the process over again
reuse threshold (750)—the figure-of-merit value that must be reached through the decay process to reuse the prefix
information (install in route table and propagate)
cutoff or suppress threshold (3,000)—the figure-of-merit value used to define the threshold to meet and exceed
before suppression of the prefix will occur
478
11. Defining and Implementing Routing Policies
group ebgp {
type external;
neighbor 10.0.23.1 {
damping;
peer-as 100;
}
}
}
}
policy-options {
damping test {
half-life 15;
reuse 60;
suppress 750;
max-suppress 3000;
}
}
Each of these parameters will be discussed, along with the penalties that a route can incur for flapping, but to understand
them, you must first be familiar with the concepts of figure of merit and exponential decay. A figure of merit is a graph
that plots representative information. The figure of merit that is used for route flap damping is an exponential half-life
decay. Fortunately, this is easier to understand that it would seem!
Half-life Decay
Half-life decay is the amount of time that it takes for half of the particles in a sample to decay. A well-known half-life
used today is that of the Carbon-14 isotope. Scientists are able to date an object based on measurements of the amount of
Carbon-14 present in an object. This carbon dating method was developed by a group of scientists led by the late Willard
www.ebook-converter.com
F. Libby of the University of Chicago who received the Nobel Prize in Chemistry in 1960 for this discovery. The half-life
of Carbon-14 is 5,568 years. This means that if you take a sample today of an object that is 5,568 years old, half the
original amount of Carbon-14 will remain. In 11,136 years (2 × 5,568), one quarter of the original amount will remain
because half of the remainder after 5,568 years will have decayed. In 16,704 years there will be one-eighth of the original
amount of Carbon-14 left, and so forth.
So, how does all this apply to route flap damping? Exponential decay is used as a method of reducing the figure of merit
for a route because the rate of decay slows over the course of time. This means that a damped route will remain in the
figure of merit for a period of observation or until its damping value has reached a predefined reuse threshold.
All routes begin with a figure-of-merit value of 0. On a two-dimensional graph, the figure of merit is plotted on the
vertical axis and time is plotted on the horizontal axis. If a route fluctuates, then it is penalized as follows:
Route withdrawn—penalty of 1,000
Route readvertised—penalty of 1,000
BGP attribute change—penalty of 500
Figure 11-9 illustrates an example of a figure of merit using default values. The example has a given route that begins
with a figure-of-merit value of 0. When the route flaps for the first time, it is given a penalty of 1,000. The route
immediately begins to decay based on a half-life of 15 minutes. After a few minutes, the route flaps once more, so it is
penalized again by another 1,000 points. Since the figure of merit has decayed, this leaves the value at around the 1,800
mark. The route flaps a third time, but again after a period of decay. This leaves the value at around the 1,900 mark.
After another period of decay, the route flaps a fourth time, taking us up to 2,500 on the figure of merit. The route still
remains in the table because it has not met the cut-off threshold. The figure of merit then decays slightly, but the fifth flap
results in the route being withdrawn from service after the figure of merit reaches 3,100. The route is kept out of service
until the figure of merit decays enough to fall under the reuse threshold value of 750; however, the hold time will not
exceed a maximum of 60 minutes. In this example, the decay took two half-lives, or 30 minutes.
www.ebook-converter.com
Note
Note that this example was fairly lenient because the route flapped five times before it was suppressed. A lower
Downloader demo watermarks
decay threshold would have caused the route to be suppressed much sooner.
Next, we have a simple example of a route being advertised, withdrawn, and readvertised. We will follow the JUNOS
method of damping. Damping is enabled, as was shown in the previous configuration example. Prefix 172.16.0.0/20
is advertised to our local system. Our local system receives the prefix and installs it into the routing and forwarding
tables.
480
11. Defining and Implementing Routing Policies
The remote system withdraws the route, causing our figure of merit to increase by 1,000, per the event values listed in
Table 11-8. Because we are using default values, the decay period is set to 15 minutes. Because the figure of merit has
not met or exceeded our default cut-off threshold of 3,000, the prefix will not be suppressed. However, the decay process
will start because there is a figure of merit. Based upon the half-life calculation, the figure of merit will decrease to 500
after 15 minutes, then to 250 after another 15 minutes, and so on.
For this example, let's assume that immediately after the prefix is withdrawn, it is immediately readvertised and
withdrawn again. This will add 1,000 to the figure of merit for the readvertisement, and another 1,000 for the withdrawal.
This brings our total figure of merit to 3,000. Looking at Table 11-9, we can see how the decay process decrease the
figure of merit every 15 minutes. According to our reuse threshold, we see that after 30 minutes of suppression, we can
reuse the prefix information.
Table 11-9. Figure-of-Merit Decay
Figure of MeritDecay Value Minutes
3,000 1,500 15
1,500 750 30
750 375 45
375 187.5 60
187.5 93.75 75
93.75 46.875 90
46.875 23.4375 105
23.4375 11.71875 120
11.71875 5.859375 135
5.859375 2.9296875 150
2.9296875 1.46484375 165
1.46484375 0.732421875180
www.ebook-converter.com
If damping is configured, we can view the parameters by issuing the show policy damping command. We can also
use the show route detail command to view damping information on a given prefix.
Damping Policies
Damping policies are normally implemented using route filters. Different damping parameters can be applied based on
prefix length. A well-known publication entitled “RIPE Routing-WG Recommendations for Coordinated Route-Flap
Damping Parameters,” better known as RIPE-229 [17], provides excellent watermarks on which to base BGP route-
damping parameters. The following example has been subdivided into two sections to improve readability and reduce
complexity:
protocols {
/* Dont enable damping globally - we want it to just apply to our eBGP peers.*/
bgp {
group your-flappy-peername {
/* turn on damping for this external peergroup */
damping;
481
11. Defining and Implementing Routing Policies
}
In general, damping should only be applied to external BGP peers. Routes that are advertised by internal peers should
have already been damped when they entered the network from an external peer. The graded-flap-damping import
policy is applied to the external BGP peer group, which sets the appropriate damping parameters. Among those
parameters is a list of special networks, such as the DNS netblocks, which should never be damped, owing to their high-
level importance. These networks are defined in the golden-networks prefix list, used to group all special networks
together.
policy-options {
/* Define Golden Networks here. Keep these current */
prefix-list golden-networks {
198.41.0.0/24;
128.9.0.0/24;
192.33.4.0/24;
128.8.0.0/16;
192.203.230.0/24;
192.5.4.0/23;
192.112.36.0/24;
128.63.0.0/16;
192.36.148.0/24;
193.0.14.0/24;
198.32.64.0/24;
202.12.27.0/24;
}
/* Define a damping policy. */
policy-statement graded-flap-damping {
term exclude {
from {
www.ebook-converter.com
prefix-list golden-networks;
}
then {
damping set-none;
next policy;
}
}
term damping {
from {
/* Lower penalty for prefixes of size /21 and smaller */
route-filter 0.0.0.0/0 upto /21 damping set-normal;
/* Medium penalty for prefixes of size /22 to /23 */
route-filter 0.0.0.0/0 upto /23 damping set-medium;
/* Higher penalty for prefixes greater than /24 */
route-filter 0.0.0.0/0 orlonger damping set-high;
}
then {
next policy;
}
Downloader demo watermarks
}
damping set-high {
half-life 30;
reuse 1640;
suppress 6000;
max-suppress 60;
482
11. Defining and Implementing Routing Policies
}
damping set-medium {
half-life 15;
reuse 1500;
suppress 6000;
max-suppress 45;
}
damping set-normal {
half-life 10;
reuse 3000;
suppress 6000;
max-suppress 30;
}
damping set-none {
disable;
}
}
Four levels of damping exist based on the recommendations laid out by RIPE: set-high, set-medium, set-
normal, and set-none. Each of these specifies a different group of damping parameters applied within the policy.
Those networks that fall in the golden-networks category should never be damped and are ignored, using the set-
none parameter. Prefixes with lengths of size /21 and smaller are given lower restrictions according to the set-
medium parameters. Aside from the golden-networks, each of the parameters is based on the size of the prefixes
that it is applied to. The most restrictive of damping policies are applied to those prefixes that are /24 and larger because
fewer hosts are presumably affected. Larger networks are given higher priority and credibility over smaller route
announcements.
The half-life for the set-normal parameters is set to 10 minutes, so if the route is suppressed, the figure of merit will
decay quickly with suppression not to exceed 30 minutes. In all three of the damping parameters, it would take three
www.ebook-converter.com
flaps to reach the suppress value of 6,000. Recall that one route withdrawal and route readvertisement add up to 2,000.
The longest period of time that a route will be damped is one hour if it is of size /24 or larger.
All of the configured damping parameters, along with computed threshold values, can be viewed by issuing the show
policy damping command at the CLI prompt while in user mode:
user@Chicago> show policy damping
Default damping information:
Halflife: 15 minutes
Reuse merit: 750 Suppress/cutoff merit: 3000
Maximum suppress time: 60 minutes
Computed values:
Merit ceiling: 12110
Maximum decay: 6193
Damping information for “set-none”:
Damping disabled
Damping information for “set-normal”:
Halflife: 10 minutes
www.ebook-converter.com
Regular expressions are made up of characters, numbers, and operators. Operators are used to match against patterns of
characters, patterns of numbers, or a combination of both. They contain individual grouping functions that enable a user
to construct complex match conditions, such as searching for multiple, rather than a single, numbers or characters. The
different operators that can be used to design a regular expression are explained as follows:
t{a, b}—. When used in a regular expression, this means that there must be at least a matches and at most b matches
of a term t, a character string or number preceding the operator. Both a and b are positive integers, and b is greater
than a.
One example would be 24{1,2} which would match sequences 24 and 24 24 because we requested a match for
at least one occurrence, and at most two occurrences, of the number 24. The number 24 in this example could be
an ASN where the matching is carried out using an expression on an AS-path list that is received in a BGP
update.
The {a, b} operator can also reside in the middle of an expression, for example, 24{1,2} 34. This expression
would match at least one occurrence, and at most two occurrences, of the number 24 immediately followed by
the number 34. Therefore this would match sequences 24 34 and 24 24 34.
484
11. Defining and Implementing Routing Policies
One example is 24{3}. This would match the sequence 24 24 24, or more specifically, three successive
occurrences of the number 24.
t{a,}—. When used in a regular expression, this means that there must be a or more repetitions of a term t, where a
is a positive integer.
One example is 24{3,}. This would match the sequences 24 24 24; 24 24 24 24; 24 24 24 24 24; and so on.
There are two special cases of this operator:
t{0,} is normally represented by a * symbol. The * or {0,} operators are used to match against zero or more
repetitions of a term t. Either format is acceptable in a regular expression.
t{1,} is normally represented by a + symbol. The + or {1,} operators are used to match against one or more
occurrences of a term t. Either format is acceptable in a regular expression.
|—When used in a regular expression, the logical OR operator matches against either of the terms specified on each
side of the | symbol.
One example is 24|34 this would match 24 or 34.
()—When used in a regular expression, round parentheses define a group of terms.
a–b—. When used in regular expressions, the minus sign between two terms is used to indicate a range.
One example is 23–34. This would match 23, 24, 25, and so on, up to 34.
There exist three additional operators that cannot be used with AS path expressions. We will review them later when we
look at communities. These operators are as follows:
www.ebook-converter.com
1.
2.
^—. When used in a regular expression, the carat symbol represents the beginning of a BGP community string.
$—. When used in a regular expression, the dollar sign represents the end of a community string.
3. []—. When used in a regular expression, square brackets are used to enclose a range of letters or digits.
Wildcard matching can be invoked using dot-star (.*) notation. Examples of this are as follows:
Dot-star— 24 25 26.*—matches the explicit sequence 24 25 26 followed by the occurrence of any other term.
Figure 11-10 illustrates the use of AS path regular expressions in JUNOS. A route X originates from AS 65535. We are
observing this route from the point of view of AS 65531. AS 65535 prepends route X with two instances of its own ASN
to make the inbound path from AS 65534 less attractive than the path from AS 65533. The route X passes through each
AS with each AS prepending the route with its own ASN. The route X arrives at AS 65531 through two different paths,
which gives AS 65531 two choices. If AS 65531 would like to use only path X: 65534 65535 65535 65535, even though
it is the longer of the two, then the configuration would look as follows:
policy-statement routex {
www.ebook-converter.com
Community Regular Expressions
At this stage you should be familiar with BGP communities, which were discussed in Chapter 10, and the regular
expression operators discussed earlier in this chapter. For those of you familiar with Cisco products, a useful piece of
information is that all community regular expressions begin with ^ and end with $. JUNOS requires the use of the
quotation marks to enclose the regular expression. The community regular expressions used in JUNOS are the same as the
standard UNIX regular expressions.
In JUNOS, community-attribute matching is very similar to AS path matching. Communities are defined in the same way
through the use of policy statements. Community definitions require a name and appropriate member IDs, such as the
following:
community sample-community members [ 65535:1 no_export no_advertise
no_export_subconfed ];
The above example illustrates all of the possible community IDs that are configurable. A regular community ID takes the
format of AS-number:Community-ID, such as 65535:1.
486
11. Defining and Implementing Routing Policies
*:*—. This matches all incoming communities.
65535:1.0—. This matches communities 110,120,130 … 190 in AS 65535.
Community attributes are transitive if present, but upon receiving a route with a community, a router can add, delete, or
modify this attribute.
A very simple policy can be configured to keep from advertising any community attributes at all:
policy-statement no-community-export {
then {
community delete match-all;
}
}
community match-all members *.*;
Because there is no from statement, all routes match and all community attributes are removed. JUNOS also supports
the configuration of the BGP extended communities attribute, but no regular expressions are supported for this as of yet.
Chapter Summary
This chapter has introduced you to routing policy, where policy is used, and how to implement it in JUNOS. A routing
policy, as was discussed, allows a network engineer to apply business considerations onto the operation of a network.
Recall that the routing policy extended throughout an AS and differed depending on the routers placement within the
network. The examples throughout the chapter should enable you to configure an abundance of flexible policies.
Whether they are for route redistribution, route parameter modification, or for more complex applications like regular
expressions, you now have the necessary tools to tackle these problems successfully.
You were introduced to the DIET policy methodology, a design model for policy deployment that can be also applied in
www.ebook-converter.com
many other areas of configuration. The chapter reviewed route redistribution and filtering and the flexibility that they
provide in controlling the information that flows into and out from your routers. In the regular expressions section you
also learned how to construct complex matching patterns for BGP AS path lists using operators as building blocks.
Finally, remember that the secret to any good policy is simplicity. Simplicity can be clearly implemented when your goals
are clearly defined.
Bibliography
www.ebook-converter.com
[ch11bib09] RIPE-181, Representation of IP Routing Policies in a Routing Registry. T.
Bates, et al. 1994.
[ch11bib10] RIPE-229, RIPE Routing-WG Recommendations for Coordinated Route-
Flap Damping Parameters. C. Panigl, et al. 2001.
[ch11bib11] www.arin.net
[ch11bib12] www.c14dating.com/int.html
[ch11bib13] www.colorado.edu/physics/2000/isotopes/radioactive_decay3.html
[ch11bib14] www.ep.net
Traffic-Engineering Problems
The Internet's level of complexity has rendered simple IGP-based methods of controlling traffic flow insufficient.
Figures 12-1 and 12-2 demonstrate why it is not always best to use metrics to control traffic flow. In Figure 12-1, traffic
from Chicago destined for Tampa and Miami is crossing the link from Chicago to Atlanta. This path is chosen because it
has a lower metric than the path through Washington D.C. In this situation the link from Chicago to Atlanta could
become overutilized, while the path through Washington D.C. remains underutilized.
www.ebook-converter.com
490
12. MPLS and Traffic Engineering
Washington D.C., which will become overutilized, while the link directly from Chicago to Atlanta is underutilized. This
change did not resolve the issue; it simply moved it.
One way to resolve the dilemma shown in Figures 12-1 and 12-2 would be to have traffic destined for Tampa use the
direct link from Chicago to Atlanta and to have traffic destined for Miami follow the path through Washington D.C., as
shown in Figure 12-3.
Traffic-Engineering Solutions
Although the concept has been around for some time, traffic engineering in IP is still in its early stages because Internet
usage only began to truly push the edge of the envelope in the middle to late 1990s. This strain on resources forced the
www.ebook-converter.com
rapid development of feasible solutions. The three most prevalent of these in the networking world are Routed IP,
switched transport, and MPLS. These solutions are described in the following sections.
Routed IP
IGP routing protocol solutions are used to route IP, and as they have been extended, they have been used to manipulate
how traffic flows through the network. By tweaking metrics on specific links, it is possible to cause certain links to look
more desirable than others. One major problem with metric manipulation is the possibility of unwanted side effects. For
example, modifying link metrics in one part of a network may cause traffic to be routed suboptimally through other
parts, as was demonstrated in Figures 12-1 and 12-2.
By itself, IGP route manipulation works well in small networks of limited complexity, where the effects of metric
tweaking would not be as widely felt and would definitely be more manageable and predictable than in a large-scale
network. While IGP metric tweaking is still possible and indeed currently implemented in larger-scale networks, it is not
the most accurate or predictable approach available.
Switched Transport
Downloader demo watermarks
Switched-transport networks, also known as overlay networks, have historically been one of the more successful means
of accomplishing traffic-engineering goals. Switched-transport networks are based on a core of ATM switches
connected to each other and to routers by logical links known as PVCs that live at Layer 2 of the OSI reference model.
Figure 12-4 shows this type of topology.
491
12. MPLS and Traffic Engineering
Figure 12-4. Routers Connected by PVCs Ringing the Edge of an ATM Core
The routers that operate at the edge of the switched-transport network see each PVC as a point-to-point circuit to other
distinct routers. These routers being OSI Layer 3 devices, they have a completely different view of the switched-
transport network topology, as is shown in Figure 12-5.
www.ebook-converter.com
MPLS
The original purpose of MPLS was to make IP routers faster. It was perceived that if the router could be forced to
function more like a switch with regards to making forwarding decisions based on OSI Layer 2 information, then it
www.ebook-converter.com
could move traffic as fast as a switch.
This was the perception in the mid 1990s of the primary purpose for MPLS. Since that time, routers have evolved to the
point where they are capable of making forwarding decisions based on OSI Layer 3 information just as quickly as, if not
more quickly than, a switch can make its Layer 2–based forwarding decision. Some engineers still believe that the use
of MPLS brings improvements over IP routing with regards to packet forwarding speed. This is simply not true.
MPLS has not been abandoned as an outdated mechanism because it is the best traffic-engineering tool available for IP
networks. It can control traffic over numerous physical media types or across a network without interfering with native
IGPs while remaining immune to their metrics-based decisions. MPLS offers the same level of control as seen with an
ATM core without being burdened with traditional ATM drawbacks. It offers a solution to the complexity and expense
of supporting two autonomous sets of equipment. MPLS is not automatically subjected to the bandwidth limitations of
ATM SAR interfaces. And lastly, MPLS takes some of the burden off of the IGP, rather than stressing it the way ATM
PVCs do.
The question as to why MPLS is good for traffic engineering has now been answered. The following sections discuss
how MPLS works.
493
12. MPLS and Traffic Engineering
to the terminology that will be used throughout the rest of this chapter. The following section offers a functional
overview of MPLS and includes an introduction to common MPLS terminology.
Functional Overview
An MPLS-enabled network gives the network engineer precise control over how traffic flows from source to
destination. To provide this control, MPLS allows packets to move independently of the IGP routing algorithms native
to the network being crossed. To accomplish this, MPLS relies on predefined paths, known as LSPs.
LSPs are composed of connections between MPLS-enabled routers. A router that is running MPLS is known as a label-
switching router (LSR). LSRs tag each packet passing through the LSP with a label. This label accomplishes several
things, the most important of which is distinguishing the MPLS packet from a regular IP packet, thereby entitling the
packet to continue crossing each LSR along the LSP without being subjected to Layer 3 scrutiny. The packet's label is
changed by the LSR at every hop, hence the name label-switching router.
JUNOS uses MPLS as the foundation for two types of services: traffic engineering and RFC 2547bis (BGP/MPLS)
VPNs. For a detailed explanation of VPNs, see Chapter 13.
Labels
Labels are a way of marking packets destined for a specific address. Packets are assigned labels by LSRs. Once they are
assigned labels, they can be forwarded through the network to the next LSR along a preconfigured path. When the
packet arrives at an LSR, the label distinguishes this packet from other IP traffic and allows it to be handled by the
MPLS protocol. This form of packet distinction permits the MPLS protocol to function on the same interfaces as the
native IGP without interfering with the IGP's routing calculations or processes.
Figure 12-6 illustrates the MPLS label format, as well as the location of the MPLS label with regard to the Layer 2 and
www.ebook-converter.com
Layer 3 headers. The following list defines the label fields shown in Figure 12-6.
20-bit label field—This is the actual label value itself. This is where the label value is inserted.
3-bit experimental field—These bits are used for CoS. They are defined as experimental because a concrete
decision has not yet been reached as to which version of CoS they will support (IP Precedence or Differentiated
Services).
1-bit stacking field—This field value is either 1 or 0. A value of 1 denotes the label is the bottom of a label stack. A
value of 0 indicates that there are multiple labels stacked on this packet. Label stacking is discussed in Chapter 13.
8-bit TTL field—In some situations the value in this field is copied from the IP header TTL field. This is
decremented as it passes through MPLS hops. When the label is popped, this value can overwrite the IP header TTL
field.
www.ebook-converter.com
The combination of label number and inbound interface is cross-referenced against a table to determine the outbound
interface and label. Once these have been determined, three common operations can be performed by LSRs on labels:
1. Push—. The MPLS label is added to packets and the packets are forwarded along the LSP. This operation is
performed as the packet enters the LSP.
2. Swap—. The MPLS label is changed as the packet carrying it passes through an LSR. This process is performed at
each transit hop along the LSP.
3. Pop—. The MPLS label is removed from the packet and a normal IP packet is forwarded by the LSR. This process
is performed by the penultimate (second-to-last) LSR.
LSPs
MPLS is based on the creation of LSPs. These LSPs are used to forward packets from a source to a destination. LSPs
are engineered on top of an already existing IP-based core network. The LSPs themselves are created in a unidirectional
495
12. MPLS and Traffic Engineering
must define which label number to use and the next-hop information. In dynamic configuration, protocols like RSVP are
used to signal label information between the ingress LSR and the egress LSR. This eliminates the need for
administrators to define which label values and next-hops to use, however, there is the capability to use administrative
constraints within JUNOS to further control LSP negotiation and setup. For a detailed description of constraints, see
Sections 12.3.2.2 and 12.3.2.3.
The MPLS signaling protocol RSVP provides the ability to configure constraints (path requirements) along the LSP. By
employing these constraints the engineer is able to define specific LSRs along the LSP as being either strict hops or
loose hops. A strict hop is a requirement that the path be formed through a specific interface to an immediately
connected LSR. A loose hop is a requirement that an LSP pass through a specific LSR. However, with loose hops there
is no requirement that a specific interface be used.
To form the LSP, Constrained Shortest Path First (CSPF) relies on specific pieces of information that are stored in a
traffic-engineering database (TED) created based on information carried by the IGP, be it IS-IS or OSPF.
Manually configuring and defining the swapping of labels at each hop creates static LSPs. Static LSP creation is useful
when implementing MPLS across small networks, or in situations where there is simply not enough bandwidth to
support a signaling protocol. See Section 12.5 for an example of creating a minimal configuration for static LSPs.
LSRs
An LSP is built across the following component LSRs:
Ingress—This is the point of origin of the LSP. By definition, it is the first router in the LSP.
Transit—This is any router in the LSP that does not provide ingress or egress functionality.
Penultimate—This is the second-to-last transit router in an LSP. The penultimate router is capable of popping the
MPLS label and sending a true IP packet to the egress router.
www.ebook-converter.com
Egress—This is the last router in an LSP.
A single router is capable of filling multiple roles for different LSPs. A transit router for one LSP could also be the
ingress router for another LSP. The egress router for one LSP could be a transit router for another LSP. There are no
mandatory hardware differences between ingress routers and transit or egress routers.
Figure 12-7 illustrates the flow of a packet through these router types. MPLS packets travel across an LSP and are
assigned labels based on the configuration present in the LSR. In this case the packets travelling between Santiago and
Rio are given a label value of 0. Label value 0 represents an explicit NULL label; therefore, this figure represents a
network scenario that uses UHP.
www.ebook-converter.com
receives from the penultimate router an IP packet with no MPLS encapsulation. If, however, PHP has not been
configured, and the egress router receives a packet with a label, it will pop the label and forward the packet based upon
its original characteristics. There is a case where the label received by the egress router is different from those listed
here. If this is the case, it is usually on a statically defined LSP, and specific configuration statements are included to tell
the router to pop the label and forward accordingly.
Establishing an LSP
As was mentioned previously in Section 12.3.1.2, there are several ways of creating an LSP. These methods include
LDP, RSVP, and CSPF and are explored in detail in the following sections.
LDP
LDP is used to create dynamic LSPs in an MPLS network. Defined in RFC 3037, LDP is typically used in nonexplicit
and non-traffic-engineered scenarios. LDP typically establishes LSPs based upon the already running IGP's routes. In
addition to typical hop-by-hop LSP establishment, LDP can tunnel through RSVP-created LSPs. This one of several
methods used for construction of MPLS-based VPNs. More details on VPNs can be found in Chapter 13.
Downloader demo watermarks
LDP operations are quite simple and based on a set of four different messages. The bibliography at the end of this
chapter lists additional documentation to refer to for detailed explanations of LDP, as well as MPLS and RSVP.
LDP works on a peer-to-neighbor relationship. As with all LSPs, an LDP LSP can be a single hop from one router to
another or across the entire network. The four message types outlined by RFC 3036 used in LDP are as follows:
497
12. MPLS and Traffic Engineering
1. Discovery messages
2. Session messages
3. Advertisement messages
4. Notification messages
These messages each play a specific role in the creation of LDP-based LSPs.
Discovery messages are used to create a neighbor or peer adjacency. LDP will send hello messages out an LDP-enabled
interface. Hello messages are sent on UDP port 646. When a neighbor answers this hello message, an adjacency is
formed. Further communication is then sent via a TCP session.
Session messages are used to maintain each LDP session with each LDP peer. Session messages are responsible for
handling the following:
Peer establishment—This session message is used for building a relationship with a neighboring LSR running LDP.
Peer adjacency—This session message is used for maintaining a relationship with a neighboring LSR running LDP.
Peer termination—This session message is used for ending a relationship with a neighboring LSR running LDP.
Advertisement messages are responsible for the following functions relating to the FEC table in each LSR:
Label creation—This message is responsible for the assignment of labels to an LSP.
Label deletion—This message is responsible for the removal of labels from an LSP, essentially tearing down the
LSP.
www.ebook-converter.com
Label modification—This message is responsible for making changes to the labels assigned to an LSP.
When a label is created in the local system, it will send an advertisement message to the associated peer advising of the
creation. If the IGP path for the LDP-based LSP goes away, then advertisement messages are used to delete the label
associated for the path between the two peers.
Notification messages come in two forms:
Advisory notifications—These are typically used when sending information about the LDP session.
Error notifications—These are used when there is an adverse condition where the LDP session needs to be
terminated. When this occurs each side of the peering will remove all labels associated with the session.
RSVP
RSVP was designed to signal bandwidth requirements on a per-flow basis. Juniper Networks has implemented an
extended version of RSVP [RSVP with traffic-engineering extensions (RSVP-TE)]. RSVP within the JUNOS
implementations is for use in support of MPLS LSPs. The Juniper Networks implementation of RSVP will continue to
Downloader demo watermarks
be referred to as RSVP in this text as this is how it is referenced in the JUNOS software. RSVP is used to reserve
resources in a given path for either multicast or unicast traffic. It uses its own messaging system within the protocol to
make these reservations. RSVP also allows a given path to be established (reserved) with specific QoS parameters.
Juniper Networks' implementation of traffic engineering takes advantage of the characteristics of RSVP and uses the
protocol to establish dynamic LSPs. These LSPs can contain strict or loose hops in their definition.
498
12. MPLS and Traffic Engineering
RSVP uses a messaging system to create LSPs. The message types are as follows:
Path Message—. sent periodically towards the downstream router; used to allow the routers to learn previous-hop
and next-hop for a given session
Resv Message—. sent from the downstream receiver of a flow towards the upstream originator; tells each router
along the path to make the reservation for the flow
PathTear Message—. signals the routers to tear down the path created by the Resv Message; flows from the
upstream router towards the downstream router
ResvTear Message—. signals each router in the flow to remove the reservation states that were set up by the
Resv Message; flows form the downstream router towards the upstream router
PathErr Message—. sent when a problem along the path occurs; advisory only; do not affect the state of the path
ResvErr Message—. used primarily when a reservation request fails; if allowed to flow through, each router
involved should receive this message
The JUNOS implementation of RSVP also contains extensions that provide traffic-engineering enhancements. These
enhancements include the following:
Explicit route object (ERO)—carries the strict and loose hop configuration elements; tells downstream routers how
to set up the LSP to the destination based on these constraints
Label request object—used to request a label on a segment from the downstream router
Label object—passes the label value chosen by the downstream LSR in the Resv Message sent to the upstream
LSR
www.ebook-converter.com
Record route object—used to track the sequence of IP addresses that the LSP crosses to reach the destination
Session attribute object—carries the name of the LSP
There are many configurable attributes within the RSVP structure, including timers for path reservations and bandwidth
settings per interface, session, and traffic flow. These are all configurable with the RSVP/MPLS configuration
parameters. See Case Study 2 at the end of this chapter for a look at some of the options available when configuring
RSVP.
CSPF
CSPF, or Constrained Shortest Path First, is used in JUNOS to compute LSPs with constraints. CSPF is used to add
variables to the TED. These variables are then used in conjunction with the TED and the SPF algorithm to create the
most efficient LSP for the network.
In CSPF, several attributes must be considered. These are classified in two distinct families: LSP attributes and link
attributes. The LSP attributes consist of the following:
499
12. MPLS and Traffic Engineering
administratively defined group
Priority—a configurable value that allows one LSP's creation to take precedence over the creation of other LSPs
Explicit route criteria—the explicitly defined strict or loose hops that the LSP must cross on route to the destination
The link attributes consist of the following:
Reservable bandwidth—calculated by taking the link bandwidth and subtracting the currently provisioned or
reserved bandwidth
Administrative groups—a method of grouping links by administratively defined characteristics, most commonly
bandwidth
www.ebook-converter.com
inet.0—the default unicast routing table where typical IGP routes are stored
inet.3—where entries created by RSVP are stored; maps a specific LSP to a destination address
mpls.0—where entries created by MPLS are stored; maps inbound interface and label combinations to outbound
interface and label combinations
The following example shows the output of the show route table inet.3 command. Here there is a route to
address 192.168.24.1. This is because the RSVP LSP configuration points to the loopback address of the remote
router.
lab@Chicago> show route table inet.3
500
12. MPLS and Traffic Engineering
mpls.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
Traffic Protection
www.ebook-converter.com
Traffic protection typically refers to a network's resiliency against outage. This section shows how Juniper Networks
routers provide this capability in a traffic-engineered network.
In a typical IGP scenario, when a link goes down, the IGP will recalculate the best path to the destination address so
long as it is still reachable. In MPLS, traffic protection occurs in a similar manner. Keepalive messages are
periodically sent between LSRs by way of the signaling protocol (RSVP). When there is an outage, the LSR upstream of
the outage uses RSVP to signal the ingress LSR that there is a failure. The ingress LSR then recalculates a new path to
the destination and builds a new LSP. A potential problem is the time required to recalculate a new route for the LSP.
RSVP relies on the native underlying network IGP; therefore, the underlying IGP must reconverge following link failure
before the RSVP protocol is capable of starting the process of establishing a new LSP.
To combat this issue, JUNOS implements two key features: secondary paths and fast reroute. With secondary paths,
JUNOS can define a secondary LSP to use in the event there is a failure of the primary LSP. Caution should be used
when engineering the secondary path. For the sake of true redundancy and the elimination of single points of failure, it
is best to create a secondary path that uses different routers and circuits than the primary.
Fast reroute is a method employed to patch a link failure prior to creating a new LSP. Figure 12-8 illustrates this. There
501
12. MPLS and Traffic Engineering
www.ebook-converter.com
set a minimal level of expectation.
This section covered the operational theory behind the methods of establishing an LSP. This included the signaling
protocols RSVP and LDP and the use of CSPF and the TED. This section also described routing table integration issues
and the theory behind configuring secondary LSPs and fast rerouting as methods of protecting traffic. The following
sections demonstrate how to build functional configurations that employ MPLS, RSVP, and LDP.
MPLS Configuration
This section shows how to build a minimal configuration for MPLS. For MPLS to be activated, it is necessary to add the
MPLS protocol family to the interfaces that will bear MPLS traffic. MPLS must also be configured under the [edit
protocols] level of hierarchy as shown below.
[edit interfaces]
lab@Chicago# set fe-0/0/0 unit 0 family mpls
[edit interfaces]
lab@Chicago# set fe-0/0/1 unit 0 family mpls
[edit interfaces]
lab@Chicago# top
[edit]
lab@Chicago# edit protocols
[edit protocols]
lab@Chicago# set mpls interface all
[edit protocols]
lab@Chicago# show
mpls {
interface all
}
www.ebook-converter.com
[edit protocols]
lab@Chicago# commit
The example below shows the routing table MPLS information. There are two labels, 0 and 1, created automatically by
JUNOS. These are actual MPLS routes in the table. Label 0 is the IPv4 explicit NULL, and 1 is the router alert label
(refer back to Section 12.3.1.1 for more information).
[edit]
lab@Chicago# show route table mpls.0
503
12. MPLS and Traffic Engineering
Static LSP Configuration
This section shows how to build a minimum configuration for a static LSP. The example uses the topology shown in
Figure 12-9. A static LSP will be created from San Francisco to Tokyo. Typically, the IGP would choose the path from
San Francisco to Chicago to Tokyo. MPLS will be used to engineer a path from San Francisco, through Chicago, then
through London, to Tokyo.
www.ebook-converter.com
inet.0: 20 destinations, 20 routes (19 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.5/32 *[OSPF/10] 00:00:21, metric 20
> to 10.0.24.1 via fxp1.0
The next configuration examples show the steps necessary to configure a static LSP from San Francisco through
Chicago, then through London, to Tokyo. The example below shows the configuration used for San Francisco. In
addition to adding family MPLS to all involved interfaces and launching the MPLS protocol, as was shown above, it
is necessary to add the static-path inet statement to the configuration. This essentially inserts a static route in
the routing table for the address 10.10.10.5/32. With the next-hop thus statically defined, label 100 will be pushed
onto the packets destined for 10.10.10.5 as they leave the LSR bound for the next-hop, 10.0.24.1.
[edit protocols mpls]
lab@SanFran# set static-path inet 10.10.10.5 next-hop 10.0.24.1 push 100
www.ebook-converter.com
lab@London# show
interface all;
interface fe-2/0/1.0 {
label-map 200 {
next-hop 10.0.0.1;
swap 0;
}
}
The next example shows the route table for route 10.10.10.5/32 from router San Francisco. In this case, the LSP
has been configured and is showing as a static path. Static routes in JUNOS take a protocol preference of 5. MPLS takes
a protocol preference of 7, while OSPF takes a protocol preference of 10.
The static route shows the interface to be used for the next-hop. Most importantly, this output shows Push 100 for
this route, indicating that traffic destined for 10.10.10.5/32 will take the LSP that was defined in the configuration.
JUNOS assigns a numerical value to routes depending on how they have been derived. This numerical value is called the
protocol preference. The lower the protocol preference, the more favorable the route. For example, statically defined
www.ebook-converter.com
[edit protocols rsvp]
lab@Chicago# show
interface all;
interface fxp0.0 {
disable;
}
Now that the RSVP protocol has been configured it is necessary to add the configuration elements that will build an
LSP. Figure 12-10 shows the topology that will be used for the RSVP configuration example.
506
12. MPLS and Traffic Engineering
no-cspf command at the [edit protocols] level of hierarchy as shown below.
[edit protocols]
lab@Chicago# set mpls label-switched-path 1 to 192.168.24.1
[edit protocols]
lab@Chicago# set mpls label-switched-path 1 no-cspf
[edit protocols]
lab@Chicago# show
mpls {
label-switched-path 1 {
to 192.168.24.1;
no-cspf;
}
}
The no-cspf statement included here makes sure that the LSR will not try to create the LSP based on the contents of
the TED.
The following example illustrates the output of the show mpls lsp command. An LSP has been established to egress
address 192.168.24.1 from ingress address 192.168.5.1. The LSPname is explicitly shown in the output of this
command. This is important as there could be multiple LSPs configured.
lab@Chicago> show mpls lsp
Ingress LSP: 1 sessions
To From State Rt ActivePath P LSPname
192.168.24.1 192.168.16.1 Up 2 * 1
Total 1 displayed, Up 1, Down 0
www.ebook-converter.com
Egress LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
192.168.24.1
From: 192.168.16.1, State: Up, ActiveRoute: 2, LSPname: 1
ActivePath: (primary)
507
12. MPLS and Traffic Engineering
8 Jan 2 03:13:07 Up
7 Jan 2 03:13:04 Deselected as active
6 Jan 2 03:13:04 No Route[2 times]
5 Jan 2 03:13:04 Clear Call
4 Jan 2 03:11:33 Selected as active path
3 Jan 2 03:11:33 Record Route: 10.0.15.1 S 10.0.13.2 S 10.0.31.1 S
2 Jan 2 03:11:33 Up
1 Jan 2 03:11:33 Originate Call
Created: Wed Jan 2 03:11:34 2002
Total 1 displayed, Up 1, Down 0
www.ebook-converter.com
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
www.ebook-converter.com
[edit protocols]
lab@Chicago# set ldp interface all
[edit protocols]
lab@Chicago# set ldp interface fxp0 disable
[edit protocols]
lab@Chicago# show
ldp {
interface all;
interface fxp0.0 {
disable;
}
}
The example below shows the output from a show route command issued on Chicago. To save space, the output has
been truncated, and only the output for prefixes 192.168.24/24 and 192.168.8/24 is shown.
509
12. MPLS and Traffic Engineering
inet.0: 26 destinations, 26 routes (25 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.8.0/24 *[BGP/170] 5d 23:32:52, MED 0, localpref 100, from
192.168.8.1
AS path: I
> to 10.0.15.1 via ge-3/0/0.0
192.168.8.1/32 *[IS-IS/18] 01:24:42, metric 10, tag 2
> to 10.0.15.1 via ge-3/0/0.0
192.168.24.0/24 *[BGP/170] 5d 23:42:42, MED 0, localpref 100, from 192.168.24.1
AS path: I
> to 10.0.15.1 via ge-3/0/0.0, Push 251047
192.168.24.1/32 *[IS-IS/18] 01:24:42, metric 30, tag 2
> to 10.0.15.1 via ge-3/0/0.0
www.ebook-converter.com
CCCs
Up to now, this chapter has focused on MPLS and the use of LDP and RSVP in an MPLS implementation. It also
showed how LDP is used in most non-traffic-engineering scenarios, and how RSVP can be used in both MPLS LSP
establishment and traffic engineering. This section introduces CCCs, or circuit cross connects, and how they are applied
to the traffic-engineering model.
CCC is not directly related to MPLS and its operation, at least in the same regard as LDP or RSVP. However, there are
certain functions of CCC that can be used with MPLS LSPs to further enhance traffic-engineering capabilities. CCC is a
proprietary function of JUNOS and will not interoperate with other vendors' systems.
CCC is a tool used to map two Layer 2 circuits of the same type within a router to each other. This functionality
expands JUNOS-based routers from typical Layer 3 operations to perform Layer 2 switching. This functionality offers
the ability to perform essential flow functions without having to go through a series of decapsulation and encapsulation
functions first. This means that flow control functions can be processed at Layer 2, versus having to decapsulate the
Layer 2 frame, analyze the Layer 3 information, encapsulate back to Layer 2, then forward. CCC also yields the ability
www.ebook-converter.com
connection.
[edit protocols connections interface-switch Chicago-NewYork]
lab@SanFran# set interface at-1/2/1.100
511
12. MPLS and Traffic Engineering
lab@SanFran# set interface-switch frame-relay-ccc
[edit interfaces]
lab@SanFran# edit so-1/0/0 unit 0
[edit interfaces]
lab@SanFran# show
interface-switch frame-relay-ccc;
so-1/0/0 {
unit 0 {
point-to-point;
encapsulation frame-relay-ccc;
dlci 501;
}
}
Chapter Summary
This chapter describe some of the past and current traffic-engineering implementations. It identified the problems that
traffic engineering is intended to solve. It described different options for traffic engineering and focused on MPLS as
the most complete option available. The chapter also pointed out the need for full awareness of not only the logical
routed portion of a network, but also the underlying transport mechanisms, and physical topology. This chapter
provided an overview of MPLS and its base operation functions, including label assignment. Following the discussion of
www.ebook-converter.com
label assignment, this chapter introduced methods of configuring LSPs, including static, signaled, and signaled with
constraints. The signaling protocols in this chapter included RSVP and LDP. This chapter also discussed the TED and its
relationship to CSPF. The section covering CCC also defined a method for traffic engineering at Layer 2 of the OSI
reference model.
Bibliography
Case Study 1: Prefix Mapping and BGP
This case study continues to use the same topology used for most of the signaled LSP examples earlier in this chapter.
Figure 12-10 shows the topology used. Earlier in the chapter, the focus was on the ingress and egress points of the LSP
with a few quick looks at some of the transit LSRs. This section will focus more on using MPLS LSPs and how to get
from specific networks to the LSP destination. In Figure 12-10, Tokyo has network 192.168.10.0/30 attached.
The configuration sample below shows that interface fe-1/0/0 is set up as an IS-IS passive interface in the IGP. The
example below also shows the output of the show route 192.168.10.0/30 command, which demonstrates that
this route is known by IS-IS.
512
12. MPLS and Traffic Engineering
[edit protocols isis]
lab@Chicago# exit configuration-mode
www.ebook-converter.com
lab@Chicago>
The next configuration sample shows the addition of an LSP mapped to a destination prefix on the egress router.
[edit protocols rsvp]
lab@Chicago# set interface all
[edit protocols]
lab@Chicago# edit mpls
513
12. MPLS and Traffic Engineering
[edit protocols mpls label-switched-path 1]
lab@Chicago# set install 192.168.10.0/30
[edit protocols]
lab@Chicago# show
rsvp {
interface all;
}
mpls {
label-switched-path example1 {
to 192.168.24.1;
install 20.171.15.0/30;
no-cspf;
}
interface all;
}
The example below shows the routing table for network 192.168.10.0/30 installed in inet.3. However, if an
attempt is made to ping or run a traceroute, no route is found because inet.3 is only used for BGP next-hop
resolution.
www.ebook-converter.com
lab@Chicago> show route 192.168.10.0/30
514
12. MPLS and Traffic Engineering
lab@Chicago# show
to 192.168.24.1;
install 192.168.10.0/30 active;
no-cspf;
}
lab@Chicago# commit
The traceroute for the network goes through the LSP to get to 192.168.10.1.
lab@Chicago> traceroute 192.168.10.1
traceroute to 192.168.10.1 (192.168.10.1), 30 hops max, 40 byte packets
1 10.0.15.1 (10.0.15.1) 0.973 ms 0.779 ms 0.715 ms
MPLS Label=251050 CoS=0 TTL=1 S=1
2 10.0.13.2 (10.0.13.2) 0.780 ms 0.702 ms 0.681 ms
MPLS Label=100312 CoS=0 TTL=1 S=1
3 10.0.31.1 (10.0.31.1) 0.551 ms 0.532 ms 0.511 ms
4 192.168.10.1 (192.168.10.1) 0.499 ms 0.475 ms 0.453 ms
When the active switch is added to the end of the install statement, it takes the route and installs it into inet.0.
BGP would still reference the route if necessary for next-hop resolution.
The next configuration sample takes a look at something that at first might seem a bit peculiar. First, the interface fe-
1/0/0 is put back into IS-IS as a passive interface. After this change is committed, both routes are installed, and the
LSP is the active one. This is because they are both in inet.0 and MPLS routes have a protocol preference of 7
versus 18 for IS-IS routes. This is shown in the configuration sample below.
[edit protocols isis]
lab@Chicago# set interface fe-1/0/0 passive
www.ebook-converter.com
lab@Chicago> show route 192.168.10.0
www.ebook-converter.com
opportunity to see the primary and secondary LSP functions. It also shows how to use the traffic-engineering
statement to place routes in inet.0 and inet.3.
The topology for this study is shown in Figure 12-11. Here, two routing paths for the primary and secondary LSPs are
established. These will travel from Chicago to Tokyo. The primary path will be established through San Francisco, New
York, and London, while the secondary path will be established through Brussels and Amsterdam.
The path command is used in the MPLS configuration as shown next. In the following example, two constraints have
been configured. Both are loose constraints. Path Tokyo-primary will force the LSP to traverse through New
York, while path Tokyo-secondary will force the LSP to traverse through Amsterdam.
[edit protocols mpls]
lab@Chicago# edit label-switched-path Tokyo
www.ebook-converter.com
}
path Tokyo-primary {
}
192.168.5.1 loose;
path Tokyo-secondary {
192.168.12.1 loose;
}
interface all;
}
Now that the paths have been configured and committed, the results can be seen by using the show mpls lsp
command. The example below shows that there are two LSPs that have been created, and they are both up.
lab@Cicago> show mpls lsp
Ingress LSP: 2 sessions
To From State Rt ActivePath P LSPname
192.168.24.1 192.168.16.1 Up 1 Tokyo * Tokyo
192.168.24.1 192.168.16.1 Up 0 Tokyo-backup Tokyo-backup
192.168.24.1
From: 192.168.16.1, State: Up, ActiveRoute: 1, LSPname: Tokyo
ActivePath: Tokyo (primary)
LoadBalance: Random
*Primary Tokyo State: Up
Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 40)
10.0.16.2 S 10.0.0.2 S 10.0.2.1 S 10.0.24.2 S
Received RRO (S [L] denotes strict [loose] hops):
10.0.16.2 S 10.0.0.2 S 10.0.2.1 S 10.0.24.2 S
6 Jan 2 07:49:33 Selected as active path
5 Jan 2 07:49:33 Record Route: 10.0.16.2 S 10.0.0.2 S 10.0.2.1 S 10.0.24.2 S
4 Jan 2 07:49:33 Up
3 Jan 2 07:49:33 Originate Call
2 Jan 2 07:49:33 CSPF: computation result accepted
1 Jan 2 07:49:04 CSPF failed: no route toward 192.168.5.1
Created: Wed Jan 2 07:49:03 2002
192.168.24.1
From: 192.168.16.1, State: Up, ActiveRoute: 0, LSPname: Tokyo-secondary
ActivePath: Tokyo-backup (secondary)
LoadBalance: Random
*Secondary Tokyo-backup State: Up
www.ebook-converter.com
Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 30)
10.0.15.1 S 10.0.13.2 S 10.0.31.1 S
Received RRO (S [L] denotes strict [loose] hops):
10.0.15.1 S 10.0.13.2 S 10.0.31.1 S
6 Jan 2 07:49:34 Selected as active path
5 Jan 2 07:49:34 Record Route: 10.0.15.1 S 10.0.13.2 S 10.0.31.1 S
4 Jan 2 07:49:34 Up
3 Jan 2 07:49:33 Originate Call
2 Jan 2 07:49:33 CSPF: computation result accepted
1 Jan 2 07:49:04 CSPF failed: no route toward 192.168.12.1
Created: Wed Jan 2 07:49:03 2002
Total 2 displayed, Up 2, Down 0
518
12. MPLS and Traffic Engineering
+ = Active Route, - = Last Active, * = Both
[edit]
lab@Chicago# show protocols mpls traffic-engineering
bgp-igp;
A show route command demonstrates that both the IS-IS route and RSVP route are now listed in inet.0.
lab@Chicago> show route 192.168.24.1
www.ebook-converter.com
+ = Active Route, - = Last Active, * = Both
192.168.24.1/32 *[RSVP/7] 00:04:36, metric 30, metric2 0
via at-2/1/0.100, label-switched-path Tokyo
> to 10.0.15.1 via ge-3/0/0.0, label-switched-path Tokyo-
backup
[IS-IS/18] 00:04:40, metric 30, tag 2
> to 10.0.15.1 via ge-3/0/0.0
In the following example, a link in the primary path has been broken, making it possible to observe how the routing
table changes over to using the configured secondary path. Only one LSP, Tokyo-backup and the IS-IS route are
visible in the routing table.
lab@Chicago> show route 192.168.24.1
backup
*[RSVP/7] 00:07:09, metric 30, metric2 0
> to 10.0.15.1 via ge-3/0/0.0, label-switched-path Tokyo-
www.ebook-converter.com
}
}
520
12. MPLS and Traffic Engineering
[edit interfaces at-1/2/0]
lab@SanFran# set atm-options vpi 0 maximum vcs 200
[edit]
lab@SanFran# edit interfaces at-1/2/1
www.ebook-converter.com
[edit interfaces at-1/2/1 unit 100]
lab@SanFran# top
[edit]
lab@SanFran# edit protocols connections interface-switch Chicago-NewYork
[edit protocols connections interface-switch Chicago-NewYork]
lab@SanFran# set interface at-1/2/1.100
[edit]
lab@SanFran# show protocols
connections {
interface-switch Chicago-NewYork{
interface at-1/2/1.100;
interface at-1/2/0.100;
}
}
To further validate the configuration, it is necessary to check the routing tables. The examples below show the relevant
contents of the routing table for LSRs Chicago and New York, respectively. IS-IS is used for the IGP on Chicago and
New York. In this case study, Chicago has a route to the configured loopback address for New York, and New York has
a route to the configured loopback address for Chicago.
www.ebook-converter.com
lab@Chicago > show route 192.168.2.1
522
[ch12bib01] “Extensions to RSVP for LSP Tunnels,” Internet-Draft, draft-ietf-mpls-rsvp-
lsp-tunnel-05.txt.
[ch12bib02] Eric W Gray,. MPLS: Implementing the Technology. Addison-Wesley,
<year>2001</year>.
[ch12bib03] “ICMP Extensions for Multiprotocol Label Switching,” Internet-Draft,
draft-ietf-mpls-icmp-02.txt.
[ch12rfc2205] IETF RFC—RFC 2205, Resource ReSerVation Protocol (RSVP) Version
1 Functional Specification. B. Braden, et al. 1997.
[ch12rfc2209] IETF RFC—RFC 2209, Resource Reservation Protocol (RSVP) Version 1
Message Processing Rules. B. Braden, L. Zhang. 1997.
[ch12rfc2210] IETF RFC—RFC 2210, The Use of RSVP with IETF Integrated Services.
J. Wroclawski. 1997.
[ch12rfc2211] IETF RFC—RFC 2211, Specification of the Controlled-Load Network
Element Service. J. Wroclawski. 1997.
[ch12rfc2215] IETF RFC—RFC 2215, General Characterization Parameters for
www.ebook-converter.com
Integrated Service Network Elements. S. Shenker, J. Wroclawski. 1997.
[ch12rfc2216] IETF RFC—RFC 2216, Network Element Service Specification Template.
S. Shenker, J. Wroclawski. 1997.
[ch12rfc2702] IETF RFC—RFC 2702, Requirements for Traffic Engineering over
MPLS. D. O. Awduche, et al. 1999.
[ch12rfc2747] IETF RFC—RFC 2747, RSVP Cryptographic Authentication. F. Baker,
Lindell B,, M. Talwar. 2000.
[ch12rfc3031] IETF RFC—RFC 3031, Multiprotocol Label Switching Architecture. E. C.
Rosen, et al. 2001.
Overview of VPNs
VPNs were initially introduced through technologies such as Frame Relay and ATM. These technologies make use of virtual
circuits for communicating between devices. These virtual connections are private and identified by a DLCI or VPI/VCI.
These identifiers are used to keep different users' traffic in different circuits, while passing the traffic on the same physical
infrastructure. Thus the term “virtual private network has evolved from the private circuits of the past to the very secure and
separate networks seen today.”
The key concept that has remained the same with VPNs is that the data of many different customers' traffic can be sent
across the same physical medium, but separated by using the virtual connection. As VPNs continue to evolve, new and better
ways are being found to implement the technology. Modern-day VPN technology service providers are using VPNs to help
reduce costs for themselves and their customers by replacing multiple networks, whether they are Frame Relay leased line or
otherwise, while still providing similar service offerings to their customers.
To provide a more thorough understanding of VPN technology and its implementations, it is necessary first to introduce some
of the terms used in the world of VPNs. This section identifies the devices used in BGP/MPLS VPNs, and the network
displayed in Figure 13-1 gives a general topological view of a VPN-enabled network. Notice the customer edge, or CE,
device. This is typically customer-premise equipment that connects to the provider's network and is usually a router or a
switch. The provider edge, or PE, device is a router located in the provider network that connects to the CE devices. These
www.ebook-converter.com
routers support VPN and label capabilities. PE routers are connected across the provider network through tunnels. The
provider router (P) devices are routers that are used in the core of the service provider network and do not connect to any CE
devices. The P routers must support MPLS, but do not have to support VPN functionality. These routers are used as a part of
the physical path that makes up the logical tunnel between the PE routers.
525
13. Virtual Private Networks
routing table). For example, to route a packet in an IP network that is overlaid on a Frame Relay network, it would be
necessary to know the IP next-hop address (Layer 3) to reach the packet's destination network. Once the IP next-hop address
is determined, then a lookup must be done to find out which Frame Relay DLCI (Layer 2) is needed for the traffic to be
shipped across the overlay network. Thus, there exists one set of control and forwarding mechanisms for the IP network and
another for the Frame Relay network. Figure 13-2 shows an overlay model example. The network being used is made up of
three CE sites connected over a Frame Relay network. The connection between each site is a Frame Relay PVC. The Layer 2
Frame Relay topology determines the forwarding path. IP VPN traffic would be forwarded over the PVCs that connect each
site.
www.ebook-converter.com
required if an overlay model were used. Another benefit that the peer-to-peer model offers is a single connection to bring
additional sites on line. In the overlay model, when adding a new site, a new virtual circuit from the newly added site may
need to be added to each of the existing sites in the VPN. The single-connection requirement can bring significant cost
savings to customers and reduce the complexity of their network configuration management responsibilities.
526
13. Virtual Private Networks
partial-mesh. These topologies used for VPNs are very similar to those that would normally be seen in Frame Relay or ATM
networks. A quick overview of each will be given. The hub-and-spoke is a configuration with several remote sites all having
connections to one central site. With VPN implementations these connections can exist between CE routers and PE routers.
Figure 13-4 examines a VPN hub-and-spoke topology; Washington D.C. and San Francisco are the CE spokes with
connections through the provider net work to CE hub Dallas. Notice that in the VPN deployment there are two hub-and-
spoke configurations. One type of VPN implementation uses the provider's equipment and another uses the customer's
equipment for connectivity.
www.ebook-converter.com
the global company that finds it more economical to exchange information between sites within the same country, as opposed
to paying for long-haul cross-ocean links from a central site to all of the remote sites.
527
13. Virtual Private Networks
peer-to-peer model. A dedicated extranet topology could be used to construct a network of VPNs that would allow any-to-
any communications for a company and its partners. This type of implementation can assist in increasing productivity for an
organization by allowing the many businesses to exchange information freely to enhance productivity for each organization.
The organizations involved would usually be in the same industry, for example the airlines and the travel agents. One might
ask, why not just use the Internet to provide this any-to-any communication? That is not a bad idea, but what about the
quality of the communication? This extranet implementation is used to provide the QoS levels required for dependable data
transfer. Figure 13-6 shows an example of a full-mesh dedicated extranet application. The airline network and travel agent
network are both made up of two sites. Through this configuration, VPNs will be created that will allow any one of the CE
sites to communicate with any other CE site.
www.ebook-converter.com
The centralized extranet differs from the dedicated extranet by providing more restricted communications between sites.
Instead of any-to-any communications, the centralized extranet allows data exchange between a central site and the allowed
remote sites. In this implementation, the remote sites do not exchange data with each other; instead, they exchange data only
with the central site. This implementation is like the traditional hub-and-spoke overlay model. There is one central site or hub
and several remote sites or spokes. The spokes sites do not talk to each other; rather, they talk to the hub only. Centralized
extranet VPNs exist because they are an effective way to allow secure data exchange between a central site and many remote
sites. This security feature comes from the fact that, in this implementation, the policy defined in the software configuration
will control which sites will be able to access the hub's, or central site's, data. Any site does not have carte blanche to access
any other site; instead, access is limited to one location. Figure 13-7 shows an application that might be used with this
implementation. In this example, the hospital CE router is the central site, and the drug, linen, and medical equipment
companies are the remote sites. Data exchange would be allowed between the drug company and the hospital, and between
the linen company and the hospital, but not between the drug company and the linen company.
Layer 3 VPNs
Service providers can implement VPN services for their customers over their existing IP infrastructures (see RFC 2547bis for
details). In this implementation, the VPN is made up of a collection of different routers that includes the P and PE routers.
These are the routers belonging to the provider that exchange routing information with each other using the service provider's
existing infrastructure. These types of VPNs are known as BGP/MPLS VPNs because they use BGP to distribute the VPN
routing information, while MPLS provides the forwarding mechanism for VPN traffic.
These types of VPNs are made up of customer equipment and provider equipment. The customer equipment is the router
located at each customer's site, and the provider equipment is in the service provider's network. In this configuration, the
provider's network will function as the glue to connect the customers' sites together. To keep one customer's traffic separate
from another's, the provider will implement different types of policy that govern how traffic from different customers will be
treated. Customers will have at least one VPN configured by the provider that will carry only their traffic. The service
www.ebook-converter.com
provider can support many VPNs, but must ensure that traffic from one VPN is not mixed with traffic from another. The
customer connecting to the provider's network and using the VPN can choose to use either public addressing or private
addressing as defined in RFC 1918.
The following sections describe BGP/MPLS VPN implementation based on RFC 2547bis. It explains how these VPNs
operate and how the supporting protocols, like BGP and MPLS, play a role in today's VPN implementations.
Route Distinguishers
If customers are using RFC 1918 addressing, it is possible for addresses to overlap between two different VPNs. This overlap
is tolerable because with this implementation of VPNs, there is a special identifier that is carried with the traffic to preserve
uniqueness. This VPN identifier is known as a route distinguisher (RD), which, as defined in RFC 2547, is used “to allow one
to create distinct routes to a common IPv4 address prefix.” The RD is a part of the VPN-IPv4 address family and is used to
identify the VPN routes exchanged between PE routers. The notation for the VPN-IPv4 identifier is a 12-byte field that
includes an 8-byte RD and a 4-byte IPv4 prefix. To break this down further, the RD field is divided into a 2-byte type field,
and a 6-byte value field. The value of the type field will determine the encoding used by the RD. In other words, if the
type field value is 0, then the RD will be encoded with an ASN. If the type field value is 1, then the RD will be an IP
address. Figure 13-8 shows the structure of the RD.
www.ebook-converter.com
to ensure uniqueness of the RD itself because these numbers are controlled. Hence, privately owned IP addresses or privately
owned ASNs are always used to populate these fields.
Note
In the JUNOS implementation, IS-IS for the CE router is not supported.
Forwarding Tables
As was mentioned earlier, BGP/MPLS VPNs use BGP to distribute routes. More specifically the PE routers will control how
routing information is distributed between other PE routers within the service provider network. Each of these PE routers will
maintain at least one per-site forwarding table. These forwarding tables will contain all of the route information learned from
the CE routers about all of the networks that they know about and want the PE routers to distribute to other PE routers and
all other CE routers in the same VPN.
The PE routers will only install routes into those per-site forwarding, or virtual routing and forwarding (VRF), tables learned
www.ebook-converter.com
from CE routers that are directly connected to the PE router or routes from the same VPN received from other PEs. All
routing look ups for packets destined for networks in the per-site-forwarding table will be handled within the VRF. If there
are packets destined for other networks the look up will be based on the standard IP routing table, inet.0. To control how
the routing information is distributed between the PE routers within the service provider network, the per-site forwarding
table will be associated with target VPNs or route targets.
The route target is a new BGP extended community attribute defined in RFC 2547 used to control how VPN routing
information is distributed between PE routers within the service provider network. When a VPN route is created, it will be
associated with one or more route-target attributes and carried in BGP as attributes of the route. This information will be used
to identify to each of the PE routers within the service provider network which routes belong to which VPN. Any route that is
marked as a VPN route and associated with a route target must be distributed to all PE routers that have the same route
target. When a PE router receives a BGP route with the route target attribute set, it identifies that route as eligible to be
installed in the per-site forwarding table. Whether or not the route is actually installed into the table is still based on the BGP
route decision process.
The route target has a type code of 16 and is encoded in 8 octets. Each extended community attribute has a type field and a
value field. The type field is either one or two bytes and the value field will be the remaining bytes. If the type field is
one byte, it defines a regular type; if it is two bytes, it defines an extended type. The first bit of the type field is the IANA
authority bit. If this bit is set to 0, it defines an IANA-assigned type; if it is set to 1, it defines a vendor-specific type. The
Downloader demo watermarks
second bit of the type field determines whether or not this is a transitive attribute. With the route target community used
with VPNs, the type field will be 0x0002 or 0x0102 (notice that the low-order byte is always 0x02). The values of these
fields are important in determining whether the assignment of the attribute was based on an IP address or ASN. If the type
field value is set to 0x00, it identifies that the assignment of this attribute is based on an ASN, while a value of 0x01 defines
an IP address. Another newly defined attribute used with VPNs is the site-of-origin attribute. This attribute is used to identify
the router or routers that inject routes into BGP. It is also transitive across the AS and is used to prevent routing loops
531
13. Virtual Private Networks
between member sites in the VPN. Just like the route target community, the site of origin will have a high-order type field
value of either 0x00 or 0x01, and if this value is 0x00, the ASN in the local administrator field must be unique across the AS
defined in the global administrator field. The low-order byte for the route of origin will be 0x03.
Figure 13-10 explains how the route target community is used. When PE router Chicago receives routes from CE router
Rome, Chicago will mark these routes and distribute them to the other PE routers in the network. In the example in Figure
13-10, CE routers Rome and Berlin are member sites of the VPN named “VPN-Red,” and CE router Hong Kong is a member
site of the VPN named “VPN-Blue.” PE router Chicago will distribute the routes for VPN-Red with a route target of
2:64000:100. PE routers New York and Seattle will receive these routes from the Chicago PE router. New York will
install the routes into the VRF for VPN-Red because it has a routing-instance associated with VPN Red that has been
configured to import routes with the extended community string set to 2:64000:100. However, the Seattle PE router's
configuration is set to handle routes for VPN Blue, and therefore, will not accept routes for VPN Red.
www.ebook-converter.com
Configuring BGP MPLS VPNs
When configuring Layer 3 VPNs in a JUNOS environment, it is necessary to enable a signaling protocol and activate MPLS
on all routers involved in constructing the VPN. A special configuration is required on all of the PE routers to include the
configuration of the VPN functionality, in addition to a signaling protocol and MPLS. The following sections describe the
required steps for configuring VPNs in a JUNOS environment. Each step is explained and discussed with reference to several
different VPN configuration examples. Each example will include a network diagram with the corresponding configurations,
as well as some useful show commands that detail the configuration and operation of the VPN implementation and protocol
behavior. It is important to understand that the VPN functionality being implemented relies upon an MPLS-enabled network
and that a full mesh of LSPs must exist between the PE routers in order for the VPNs to function properly. To implement
BGP/MPLS VPNs on Juniper Networks routers, it is necessary to configure a signaling protocol on the PE routers. Either the
RSVP or LDP as signaling options are available.
3. Once RSVP has been enabled, it is possible to verify a configuration with the following show commands from
operational mode:
show rsvp neighbor—. displays a summary list of the router's RSVP neighbors
lab@Chicago# run show rsvp neighbor
RSVP neighbor: 1 learned
Address Idle Up/Dn LastChange HelloInt HelloTx/Rx MsgRcvd Status
10.0.0.1 5 1/0 49:43 3 971/971 47 –
Note—
Remember that JUNOS allows operational-mode commands to be executed while still in configuration
mode by using the run command.
show rsvp interface—. This command displays a summary list of the router interfaces configured for RSVP,
the state of the interface, and resource information.
lab@Chicago# run show rsvp interface
RSVP interface: 3 active
High-
Active Subscr- Static Available Reserved water
Interface State resv iption BW BW BW mark
fxp0.0 Up 0 100% 100Mbps 100Mbps 0bps 0bps
fe-1/0/3.0 Up 0 100% 100Mbps 100Mbps 0bps 0bps
at-1/2/1.100 Up 1 100% 155.52Mbps 155.52Mbps 0bps 0bps
show rsvp interface detail—. This command provides a more in-depth look at the RSVP functionality and
keeps track of the different types of RSVP messages. This can be a useful command to determine if the RSVP
messages are being exchanged properly.
www.ebook-converter.com
lab@Chicago# show rsvp interface detail
RSVP interface: 3 active
at-1/2/1.100 Index 6, State Ena/Up, ActiveResv 1, PreemptionCnt 0
NoAuthentication, NoAggregate, NoReliable, HelloInterval
3(second)
Address 10.0.0.2, 192.168.5.1
Subscription 100%, StaticBW 155.52Mbps, AvailableBW 155.52Mbps
ReservedBW [0] 0bps[1] 0bps[2] 0bps[3] 0bps[4] 0bps[5] 0bps[6]
0bps[7] 0bps
PacketType Total Last 5 seconds
Sent Received Sent Received
Path 35 38 0 0
PathErr 0 0 0 0
PathTear 0 1 0 0
Resv 38 35 0 0
ResvErr 0 0 0 0
ResvTear 0 0 0 0
Hello 1175 1175 1 1
Ack 0 0 0 0
Srefresh 0 0 0 0
show rsvp session—. This command displays information about the RSVP session to include the name of the
show rsvp session detail—. This command provides a detailed look at the RSVP sessions configured on
the router. It is useful for checking how RSVP information is being exchanged between RSVP neighbors.
lab@Chicago# run show rsvp session detail
Ingress RSVP: 1 sessions
192.168.2.1
From: 192.168.5.1, LSPstate: Up, ActiveRoute: 0, LSPname: Chicago-to-newyork
Resv style: 1 FF, Label in: -, Label out: 100014
Time left: -, Since: Fri Aug 24 14:25:14 2001
Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
Port number: sender 2 receiver 17 protocol 0
PATH rcvfrom: localclient
PATH sentto: 10.0.0.1 (at-1/2/1.100) 22 pkts
RESV rcvfrom: 10.0.0.1 (at-1/2/1.100) 22 pkts
Explct route: 10.0.0.1 10.0.1.1
Record route: <self> 10.0.0.1 10.0.1.1
Total 1 displayed, Up 1, Down 0
Egress RSVP: 1 sessions
192.168.5.1
From: 192.168.2.1, LSPstate: Up, ActiveRoute: 0, LSPname: newyork-to-Chicago
Resv style: 1 FF, Label in: 3, Label out: -
Time left: 123, Since: Fri Aug 24 14:25:40 2001
Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
www.ebook-converter.com
Port number: sender 3 receiver 17 protocol 0
PATH rcvfrom: 10.0.0.1 (at-1/2/1.100) 21 pkts
PATH sentto: localclient
RESV rcvfrom: localclient
Record route: 10.0.1.1 10.0.0.1 <self>
Total 1 displayed, Up 1, Down 0
Transit RSVP: 0 sessions
Total 0 displayed, Up 0, Down 0
In order for LDP to function properly, it is necessary to configure either IS-IS or OSPF. More details for enabling IGPs
can be found in Chapters 8 and 11.
534
13. Virtual Private Networks
Like RSVP, MPLS needs to be configured on a per-interface basis. The all parameter is also available with MPLS. The
following example builds a configuration that will allow an RSVP signaled MPLS LSP.
3. From the configuration mode, type the following to enable MPLS.
[edit protocols mpls]
lab@Chicago# set interface interface name
4. In addition to enabling MPLS on each participating interface, it is important to also configure the interface to handle
MPLS traffic.
[edit interfaces]
lab@Chicago# set interfaces interface name unit interface unit number
family mpls
5. The LSP that is created will be used as a forwarding mechanism for the VPN traffic.
[edit protocols mpls]
lab@Chicago# set label-switched-path path name to to
Note
The value for to should be the IP address of the egress router. The path name is a name given as a
description for this LSP. When naming items in JUNOS, be as descriptive as possible to make reading the
configuration easier later on. This is how the command is displayed in the JUNOS CLI.
This configuration statement defines the IP address of the egress router that should be used to set up an LSP
dynamically. Use the following show commands to verify the MPLS configuration:
show mpls lsp—. This command displays the LSPs configured on the router by LSPname, the IP address of the
beginning and endpoint of the LSP, the state, and the type of LSP, type being ingress, egress or transit.
www.ebook-converter.com
lab@Chicago# run show mpls lsp
Ingress LSP: 1 sessions
To From State Rt ActivePath P LSPname
192.168.2.1 192.168.5.1 Up 0 * Chicago-to-newyork
Total 1 displayed, Up 1, Down 0
Egress LSP: 1 sessions
To From State Rt Style Labelin Labelout LSPname
192.168.5.1 192.168.2.1 Up 0 1 FF 3 - newyork-to-Chicago
Total 1 displayed, Up 1, Down 0
Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
show mpls lsp detail—. This command provides a more in-depth analysis of the LSP. It displays information
about the computed route objects, as well as the received route objects.
lab@Chicago# run show mpls lsp detail
Ingress LSP: 1 sessions
192.168.2.1
From: 192.168.5.1, State: Up, ActiveRoute: 0, LSPname: Chicago-to-newyork
ActivePath: (primary)
535
13. Virtual Private Networks
Egress LSP: 1 sessions
192.168.5.1
From: 192.168.2.1, LSPstate: Up, ActiveRoute: 0, LSPname: newyork-to-Chicago
Resv style: 1 FF, Label in: 3, Label out: -
Time left: 148, Since: Fri Aug 24 14:25:40 2001
Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
Port number: sender 3 receiver 17 protocol 0
PATH rcvfrom: 10.0.0.1 (at-1/2/1.100) 22 pkts
PATH sentto: localclient
RESV rcvfrom: localclient
Record route: 10.0.1.1 10.0.0.1 <self>
Total 1 displayed, Up 1, Down 0
Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
Note
The output displays both an ingress and egress path. The ingress path is the path that was configured on the other
PE router. Each MPLS path is constructed in a unidirectional manner.
Configuring an IGP
In order for the provider equipment to be able to exchange routing information within the network, it is necessary to
configure either static routes or a dynamic routing protocol. This section describes the commands used to enable an interior
routing protocol in support of the VPN configuration.
Note
The coverage mentioned here is only enough to support the VPN configuration. More detailed explanations can be
found in Chapter 8.
www.ebook-converter.com
IS-IS
[edit protocols isis]
lab@Chicago# set interface interface name
[edit interfaces]
lab@Chicago# set interface name unit interface unit number family iso address address
Note
A common mistake made when configuring IS-IS is forgetting to configure an ISO address on the loopback0
interface.
When configuring IS-IS each interface that will run IS-IS must be assigned to the ISO family.
The show route table inet.0 command displays the router's routing table. Note that routes are being learned from
other IS-IS speaking routers. Use the following commands to verify the IS-IS configuration:
lab@Chicago# run show route table inet.0
OSPF
[edit protocols ospf area 0.0.0.0]
set interface interface name
The previous configuration example shows how to enable OSPF on an interface.
Note
The keyword all is available when selecting the interfaces. However, it is good practice to specify the interfaces
individually. This will help to ensure that the protocol is not enabled on an interface where it is not needed.
www.ebook-converter.com
Static Routes
The following example lists the configuration statements for static routes:
[edit routing-options]
set static route destination next-hop value
Note
The value field should be the next-hop IP address.
www.ebook-converter.com
inet.2 0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last
Up/Dwn State|#Active/Received/Damped...
192.168.2.1 100 24 5 0 0 1:21 10/12/0 0/0/0
show bgp summary—. This command lists a brief summary of the peering sessions with this router.
lab@Chicago> show bgp neighbor
Peer: 192.168.2.1+4827 AS 100 Local: 192.168.5.1+179 AS 100
Type: Internal State: Established Flags: <>
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Options: <Preference HoldTime Refresh>
Holdtime: 90 Preference: 170
Number of flaps: 0
Peer ID: 192.168.2.1 Local ID: 192.168.5.1 Active
Holdtime: 90
Keepalive Interval: 30
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Table inet.0 Bit: 10000
Send state: in sync
538
13. Virtual Private Networks
Configuring the VRF for the VPN
Each VPN is required to have its own routing-instance. A routing instance is a section in the configuration hierarchy
where the individual characteristics are assigned to the VPN. The VRF import and export policy to be used and the
association of an interface to the VRF will be defined in the routing-instance. This procedure covers the necessary
configuration steps to create the routing-instance to support each VPN.
[edit]
lab@Chicago# edit routing-instances instance name
The following statement is used to name the routing-instance:
[edit routing-instances instance name]
lab@Chicago# set instance-type vrf
The following statement defines the routing-instance as the VRF to be used for the VPN named VPN-Red:
[edit routing-instances instance name]
lab@Chicago# set interface interface name
The interface statement configured under the routing-instance should specify the interface that is physically
connected to the CE router. However, when manipulating JUNOS, this is the logical interface, not the physical. In other
words, it is necessary to include the logical unit number when performing this configuration.
[edit routing-instances instance name]
lab@Chicago# set route-distinguisher rd type
Note
The RD will be specified as mentioned earlier. The rd type value will be either a [16 bit:32 bit] or an
www.ebook-converter.com
[IP address:16 bit] value.
VPN Policy
The following policy-statements are used to determine which learned routes would be installed into the VRF on the PE
router. Refer to Chapter 10 for more detailed explanations of general policy. The examples in this section are used strictly for
VPNs.
[edit]
lab@Chicago# edit policy-options policy-statement policy name
[edit policy-options policy-statement policy name]
lab@Chicago# set term A from protocol bgp community value
Note
The entry for the value field should be the route target community used when the PE router distributes these
routes to other PE routers.
Note
In this example, OSPF is the protocol used to exchange routes with the CE router. If using BGP or static routes,
that option would be chosen instead of OSPF.
[edit policy-options policy-statement policy name]
lab@Chicago# set term A then community add community name
Note
The community string that is being added through this policy tells the PE router to add this community string to the
routes that are being received from the CE router. These routes will be announced via MBGP to the other PE
router. Their import policy should be configured to accept routes with the same community.
[edit policy-options policy-statement policy_statement]
lab@Chicago# set term A then accept
[edit policy-options policy-statement policy_statement]
lab@Chicago# set term B then reject
www.ebook-converter.com
The following statement will be used to associate the policy-statement with the routing-instance VRF. All routes
that match that policy-statement will be exported from the VRF. These are the routes that will be sent to other PE
routers in the network.
[edit routing-instances instance name]
lab@Chicago# set vrf-export instance name
The following command defines the BGP extended route target community:
[edit policy-options]
lab@Chicago# set community community name members target:value
PE-CE Configuration
In order for routes to be exchanged between the PE routers and CE routers, there must be some kind of routing protocol
configured. The options available include RIP, OSPF, or BGP. Static routes are also supported, but IS-IS is not. This protocol
is configured with the routing-instance and is only used with that individual instance.
540
13. Virtual Private Networks
only interface configured for OSPF is the Fast Ethernet interface connected to the CE router.
BGP
[edit protocols bgp]
lab@Chicago# set group group name type [internal|external]
[edit protocols bgp group internal]
lab @Chicago# set neighbor address
The set group command under [edit protocols bgp] is used to create a BGP peer group. Configuring peers or
neighbors is done with the set neighbor command.
Static Routes
The following example lists the configuration statements for static routes:
[edit routing-options]
set static route destination next-hop value
Chapter Summary
VPNs can be identified in many different ways. This chapter focused mainly on BGP/MPLS VPNs. The discussion covered
different VPN models and some of the various topologies that can be used with these models to implement VPN services.
Reference was made to the overlay model and the peer-to-peer model. The chapter also examined the operation of full-mesh,
partial-mesh, and hub-and-spoke topologies used in VPN implementations.
A major point to understand with VPNs and their implementation is the way that routing information is exchanged, based
www.ebook-converter.com
upon the VPN implementation model. When dealing with the RFC 2547bis implementation, remember that RDs are used to
identify each route that should populate each PE router's VRF for a specific VPN. In the peer-to-peer model, this routing
information is exchanged between the customer routers and the provider's routers. In the overlay model, the provider
provides virtual circuits to the customer routers, and they exchange routing information directly between themselves. This is a
new concept of provider-managed versus customer-managed routing, and it is one of the main drivers behind this technology.
Bibliography
The following RFCs and drafts define the evolution of VPN technology and the business case for its implementation:
www.ebook-converter.com
with the router name and displays the configuration for the routers listed in Figure 13-11.
PE Router Chicago
The following output is the configuration used by PE router Chicago in Case Study 1. This router will exchange routing
information with PE router New York.
interfaces {
fe-1/0/3 {
unit 0 {
family inet {
address 10.0.8.1/24;
}
family mpls;
at-1/2/1 {
atm-options {
vpi 0 maximum-vcs 200;
}
www.ebook-converter.com
}
}
isis {
level 1 disable;
interface all;
}
}
policy-options {
policy-statement MY-EXPORT {
term a {
from protocol ospf;
then {
community add VPN-Red;
accept;
}
}
term b {
then reject;
}
www.ebook-converter.com
address 10.0.24.1/24;
}
family mpls;
}
}
so-0/3/0 {
unit 0 {
family inet {
address 10.0.1.1/24;
}
family iso;
family mpls;
lo0 {
unit 0 {
family inet {
address 192.168.2.1/32;
}
family iso {
address 49.0000.0000.0003.00;
www.ebook-converter.com
}
then accept;
}
term b {
then reject;
}
}
policy-statement MY-EXPORT {
term a {
from protocol ospf;
then {
community add VPN-Red;
accept;
}
}
term b {
then reject;
}
}
P Router Seattle
Seattle is being used as a provider router and will only function as a part of the MPLS paths between PE routers. The
configuration for Seattle is displayed below:
interfaces {
at-1/2/0 {
atm-options {
vpi 0 maximum-vcs 200;
}
unit 100 {
vci 0.100;
family inet {
address 10.0.0.1/24;
}
family iso;
family mpls;
}
}
so-2/0/0 {
unit 0 {
family inet {
www.ebook-converter.com
address 10.0.1.2/24;
}
family iso;
family mpls;
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
family iso {
address 49.0000.0000.0002.00;
routing-options {
router-id 192.168.0.1;
autonomous-system 100;
}
protocols {
rsvp {
interface all;
}
546
13. Virtual Private Networks
CE Router Rome
CE router Rome is site one for the VPN-Red and connects to PE router Chicago. Rome's configuration is displayed below:
interfaces {
fe-1/0/3 {
unit 0 {
family inet {
address 10.0.8.2/24;
lo0 {
unit 0 {
family inet {
address 192.168.12.1/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface all;
CE Router Berlin
CE router Berlin is site two for the VPN-Red and connects to PE router New York. The Berlin router's configuration is
displayed below:
interfaces {
so-1/1/0 {
www.ebook-converter.com
unit 0 {
family inet {
address 10.0.24.2/24;
lo0 {
unit 0 {
family inet {
address 192.168.24.1/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface all;
www.ebook-converter.com
Figure 13-12. Case Study 2
Note
When using BGP as the protocol between the CE hub and PE hub, BGP should be configured to accept routes with
its own ASN listed more than once in the AS path list.
[edit routing-options]
set autonomous-system as-number loops number of loops from 0-10
The following examples show working Layer 3 VPN configurations on Juniper Networks routers. Each section is labeled with
the router name and displays the configuration for the routers listed in Figure 13-12.
www.ebook-converter.com
family inet {
address 192.168.5.1/32;
}
}
}
}
routing-options {
router-id 192.168.5.1;
autonomous-system 100;
}
protocols {
mpls {
interface at-1/2/1.100;
interface at-1/2/1.102;
interface fe-1/0/3.0;
interface at-1/2/0.100;
}
bgp {
local-address 192.168.5.1;
www.ebook-converter.com
}
policy-statement SPOKE {
term A {
from {
protocol bgp;
community SPOKE;
}
then accept;
}
term B {
then reject;
}
}
policy-statement SEND-VPN {
term A {
from protocol bgp;
then accept;
}
term B {
www.ebook-converter.com
The Rome router is being used in Case Study 2 as a PE spoke. The configuration is displayed below:
interfaces {
fe-1/0/3 {
unit 0 {
family inet {
address 10.0.8.2/24;
}
family mpls;
}
}
ge-1/2/0 {
unit 0 {
family inet {
address 10.0.13.2/24;
}
family mpls;
}
}
www.ebook-converter.com
}
policy-options {
policy-statement To-Hub {
term A {
from {
protocol bgp;
community HUB;
}
then accept;
}
term B {
then reject;
}
}
policy-statement To-Spoke {
term A {
from protocol ospf;
then {
community add SPOKE;
then reject;
}
}
552
13. Virtual Private Networks
policy-statement SEND-VPN {
term A {
from protocol bgp;
then accept;
}
term B {
then reject;
}
}
community HUB members target:64512:01;
community SPOKE members target:64512:02;
}
routing-instances {
PE-Spoke-Rome-to-PE-Hub {
instance-type vrf;
interface ge-1/2/0.0;
route-distinguisher 192.168.12.1:64512;
vrf-import To-Hub;
vrf-export To-Spoke;
protocols {
ospf {
export SEND-VPN;
area 0.0.0.0 {
interface ge-1/2/0.0;
www.ebook-converter.com
interfaces {
so-0/1/0 {
unit 0 {
family inet {
address 10.0.24.1/24;
}
family mpls;
}
}
at-6/2/0 {
atm-options {
vpi 0 maximum-vcs 200;
}
unit 100 {
vci 0.100;
family inet {
address 10.0.2.1/24;
}
www.ebook-converter.com
ldp {
interface at-6/2/0.100;
}
}
policy-options {
policy-statement To-Hub {
term A {
from {
protocol bgp;
community HUB;
}
then accept;
}
term B {
then reject;
}
}
policy-statement To-Spoke {
term A {
www.ebook-converter.com
CE hub router Seattle uses the router configuration displayed below. This router will serve as a hub router for the other two
CE routers, Berlin and Singapore.
interfaces {
at-1/2/0 {
atm-options {
vpi 0 maximum-vcs 200;
}
unit 100 {
vci 0.100;
family inet {
address 10.0.0.1/24;
}
}
unit 102 {
vci 0.102;
family inet {
address 172.16.1.2/24;
www.ebook-converter.com
interface all;
556
[ch13bib01] “BGP/MPLS VPNs,” Internet-Draft, draft-rosen-rfc2547bis. Juniper
Networks uses this document to implement BGP/MPLS VPNs.
[ch13rfc2547] IETF RFC—RFC 2547, BGP/MPLS VPNs. E. Rosen, Y. Rekhter. 1999.
This RFC has been made obsolete by RFC2547bis.
[ch13rfc2685] IETF RFC—RFC 2685, Virtual Private Networks Identifier. B. Fox, B.
Gleeson, 1999.
[ch13rfc2764] IETF RFC—RFC 2764, A Framework for IP Based Virtual Private
Networks. B. Glesson, et al. 2000.
[ch13rfc2917] IETF RFC—RFC 2917, A Core MPLS IP VPN Architecture. K.
Muthukrishnan, A. Malis, 2000.
www.ebook-converter.com
www.ebook-converter.com
Figure 14-1. Comparison of Unicast and Multicast Bandwidth Utilization
This chapter provides an overview of the more commonly deployed multicast technologies possible on Juniper
Networks routers. It will explain them, discuss how they operate, and look at methods for implementing them. While
this is a technical discussion and not a sales presentation, the reasons to consider multicast in your network are growing
ever stronger and should be considered carefully.
It should also be noted that there are many RFCs dedicated to describing each of the different multicast technologies
discussed in this chapter as well as in entire books devoted just to multicast. This chapter does not try to be a complete
solution or provide final word on anything multicast; it is an introduction. The goal of this chapter is to introduce you to
the world of multicast by opening the door, sharing some perspectives, and demonstrating how multicast is configured
on a Juniper Networks router. Some readers will decide they need more information; others will find this chapter's
coverage perfect for their needs. For those needing more information, interspersed throughout this chapter are
references to additional sources, and readers are encouraged to take advantage of the bibliography as well.
Multicast Backbone
Downloader demo watermarks
Intel, Microsoft, Cisco Systems, and children's favorite Toys-R-Us are all companies that have deployed cost-saving and
business-enabling multicast solutions. These are just companies with large enterprise networks and even ISPs are
activating multicast on their production networks.
Multicast is a unique aspect of routing in networks that has been steadily growing in use across the Internet. However,
558
14. Multicast Protocols
many engineers have yet to acknowledge its growing role. Certainly your everyday Internet consumer is completely
oblivious to its existence as an overlay on the Internet known as the multicast backbone (mbone).
In a typical IPv4 unicast routing scenario, delivery, ordering, and delay are not guaranteed. Although multicast employs
techniques to use bandwidth more efficiently, there is still no guarantee of delay and ordering. Thus, in addition to
multicast techniques, proper application deployment and internal application correction methods need to be
implemented to take advantage of multicast fully. Do not misunderstand—multicast does have some issues associated
with it, the largest being that network engineers do not seem to believe in it as a solution, it has no built-in network
congestion avoidance mechanism, there are packet duplication issues, and because multicast commonly uses UDP as
the transport mechanism, packet delivery can be unreliable at times.
As multimedia in all its forms more strongly dominates the realm of networking in general and the Internet in particular,
the use of multicast becomes ever more important. Juniper Networks has a strong multicast implementation that enables
the issues associated with multicast to be better addressed through the support of many of the newer multicast protocols
designed to cope with these issues.
Mbone was at its inception like many fundamental stalwarts of the Internet today—an experiment. The IETF wanted to
broadcast its meetings to those unable to be present who were located across the globe. The idea at the time was to
create a volunteer-based experiment to explore how to successfully transmit audio and video from one source to many
destinations. The technology to provide this type of host and network capabilities evolved into several new technologies
known collectively as multicasting.
Mbone is an interconnected set of subnetworks of routers that support multicast. These routers are grouped together
into multicast islands that are then overlaid onto the Internet as shown in Figure 14-2. An island is connected to another
island over the Internet via a tunnel (a virtual point-to-point link). These tunnels allow multicast traffic to pass
undisturbed through the portions of the Internet that are not multicast-enabled.
www.ebook-converter.com
559
14. Multicast Protocols
The standards relating to multicast are as follows:
RFC 1112, “Host Extensions for IP Multicasting” (defines IGMP Version 1)
RFC 2236, “Internet Group Management Protocol, Version 2”
RFC 2327, “SDP: Session Description Protocol”
RFC 2362, “Protocol Independent Multicast-Sparse Mode (PIM-SM): Protocol Specification”
RFC 2365, “Administratively Scoped IP Multicast”
“Protocol Independent Multicast Version 2 Dense Mode Specification,” Internet draft, draft-ietf-pim-v2-dm-03.txt
“Distance Vector Multicast Routing Protocol,” Internet draft, draft-ietf-idmr-dvmrp-v3-07
“SAP: Session Announcement Protocol,” Internet draft, draft-ietf-mmusic-sap-00
“MSDP,” Internet draft, draft-ietf-msdp-spec-01.txt
“Anycast RP Mechanism Using PIM and MSDP,” Internet draft, draft-ietf-mboned-anycast-rp-05.txt
To access Internet RFCs and drafts, go to the IETF Web site at www.ietf.org. These standards are current in their status
at the time of this writing. It is always good to look beyond the standards to how they have been interpreted. The
following additional resources can assist:
ftp://parcftp.xerox.com/pub/net-research/mbone/maps/mbone-map.pdf
www.savetz.com/mbone/
www.ebook-converter.com
www-itg.lbl.gov/mbone/
Benefits of Multicasting
Before this chapter delves into the details of how multicasting works, the following list describes some of the benefits of
multicasting. We will look at these benefits first from a network engineer's perspective and then from a cost-profit
business perspective.
Provides economic benefits through savings in costs and server resources
Allows increased users in a multicast group without an exponential networkwide increase in bandwidth use
Reduces the load on the sending server, which no longer has to support many sequential or concurrent unicast
sessions (this benefit can be just as significant as the bandwidth savings)
Decreases LAN traffic, thus reducing potential bottlenecks and scaling issues
560
14. Multicast Protocols
Multimedia conferencing, including audio and video, electronic whiteboards, and Microsoft's Net Meeting
Data distribution and sharing information, such as files and data, Gnuetella and Bear Share (file sharing
applications), and Napster or clone
Real-time data, like stock tickers and news reports (certainly it will not be long before sporting events and concerts
are multicast regularly over the Internet)
The hosting and selling subscriptions to participate in Internet games like Doom, Quake, Dungeon Siege, and
Everquest and military warfare simulations
As the Internet has evolved and information sharing has increased, many different models to share information via the
Internet have been developed. Some have gotten the rest of the world really stirred up, but the point here is that
multicasting applications are on the rise and this will continue! Are you ready?
www.ebook-converter.com
PIM—PIM supports two modes of operation (dense and sparse) and is used for efficiently routing to multicast
groups that might span wide-area and interdomain internetworks. It is referred to as protocol independent because
it is not dependent on any particular unicast routing protocol. JUNOS also supports dense-sparse mode, which is a
combination of features from both modes.
MSDP—This multicast routing protocol is used by PIM when in sparse mode to span multicast domains to discover
other multicast sources in other domains.
MBGP—BGP was extended to carry multicast family information, allowing the sharing of multicast information
between ASs. MSDP will not function properly without MBGP as we will see later in this chapter.
Session Announcement Protocol (SAP) and Session Description Protocol (SDP)—These protocols handle
conference session announcements.
It is commonly understandood that when discussing multicast and BGP, the “m” in MBGP stands for “multicast,” even
though the RFC defines it as “multiprotocol.”
www.ebook-converter.com
Figure 14-4. Multicast Transmission Model
Multicast Addresses
Multicast addresses utilize addresses out of the IANA reserved Class D range. This range has all addresses with their
high-order bits as 1110, and all addresses are expressed in the dotted decimal notation as
224.0.0.0–239.255.255.255 or 224.0.0.0/4. Out of the range of possible addresses available, Table 14-1
shows those that have been allocated or reserved. To review the format of IP addresses, refer to Chapter 2.
Table 14-1. Multicast Address Allocations
www.ebook-converter.com
thus possible to map 32 different multicast group IDs map to each Ethernet address as shown in Figure 14-5.
www.ebook-converter.com
routing of the multicast transmission, and the next step is to determine which of the potential hosts would like to receive
this multicast transmission. Determining host membership is the responsibility of the group membership protocol as it
probes the Ethernet listening for requests to join the multicast transmission group.
564
14. Multicast Protocols
Receiving IP Datagrams
Multicast sends a packet by specifying a group of multicast participants as the destination. This makes sense and is
straightforward because we have already discussed how one of the benefits of multicast is its ability to group users
together; you know, however, that there is a but coming! But, when a host receives a multicast packet, the process to
understand it is a bit more complicated.
Before a host can receive a multicast packet, it must first request to be a part of a multicast group (e.g., “I want to view
today's live press conference with the President”). This membership request is sent to the host local router and
potentially to others as well. This gets interesting when we recall that for the router to forward the multicast event over
the LAN, the MAC address must be known. Multicast, however, is a one-to-many technology, so a new virtual MAC
address is created and the hosts on the LAN that have joined the group now listen to their native MAC address and this
newly created multicast group MAC address for their LAN. Thus, when the LAN router receives the multicast stream, it
forwards the datagrams with the destination address of the multicast group. The receiving host(s) participating in the
multicast event will, upon receiving a multicast frame destined for them, read the entire message. They de-encapsulate
the frame passing the multicast message up to the TCP/IP protocol stack until the user's application presents the data to
the user and he or she can see or hear the company's president speaking or, perhaps, the Super Bowl!
Multicast has been implemented very nicely here in the sense that the LAN router does not track the destination host's
MAC address. Recall that in unicast IP, MAC addresses and IP addresses are bound together; this is not so in multicast.
Multicast-enabled routers only need to know the list of multicast groups that are on its LAN. Thus, a multicast router
attached to an Ethernet segment need associate only a single Ethernet multicast address with each host group having a
local participant. This means the router doesn't care who the receivers are, only that a group has one local member on
the LAN.
Distribution Trees
Referring back for a moment to Figure 14-4, we can see how multiple branches in a tree need to be created to track the
www.ebook-converter.com
flow of multicast packets. This is similar to how IP routing determines path data as well. In multicast this function is
handled by the multicast routing protocol in use.
In cases where more than one router is present in a subnetwork, the one physically closer to the source of a multicast
message is elected to be in charge of forwarding multicast messages. All other routers will simply discard the multicast
messages sent from that source. If there is more than one router on the subnetwork with the same distance from the
source, the router with the lowest IP address is elected to forward the multicast. IGMPv2 uses the multicast address of
224.0.0.1 for the entire multicast system to compare the IP addresses on every network; the router with the lowest is
elected to be in charge.
TTL
The scope (transmission range) of an IP multicast packet can be limited by using the TTL field in the IP header. Each IP
multicast packet uses the TTL field of the IP header as a scope-limiting parameter. The TTL field controls the number of
hops that an IP multicast packet is allowed to propagate. Each time a router forwards a packet, its TTL is decremented.
A multicast packet whose TTL has expired (is 0) is dropped without an error notification to the sender. Table 14-3 lists
the conventional TTL values used to limit the scope of multicast packets. This mechanism prevents messages from
TTLMulticast Scoping
0 Restricted to same host
565
0 Restricted to same host 14. Multicast Protocols
TTLMulticast
1 Restricted Scoping
to same subnet
15 Restricted to same site
63 Restricted to same region
127 Worldwide
191 Worldwide limited bandwidth
255 Unlimited
TTL thresholds in multicast routers prevent datagrams with less than a certain TTL from traversing certain subnets. This
can provide a convenient mechanism for confining multicast traffic to within campus or enterprise networks.
Juniper Networks documentation does clearly point out that though this is a viable method of scoping, there have been
issues with this type of scoping deployment. Specifically, sometimes shortening the route can result in the multicast
information from not reaching a router anymore. Needless to say, each implementation will be different, so keep an eye
on this just in case as some features from TTL used in scoping can in fact increase the reliability and stability of the
multicast platform.
IGMP
Multicast packets need to be forwarded by the routers in between the source and destination just like in unicast routing.
In multicast you must ensure that your multicast packets are only forwarded to LANs where a host is located that
belongs to the multicast group. In other words do not send multicast transmissions to a LAN if no one has asked. IGMP
must be enabled on routers that wish to receive multicast information. IGMP is also the transport protocol for multicast
protocols (DVMRP and PIM).
Multicast-enabled routers need to learn which directly connected host wish to participate in a given multicast group use
IGMP. This is accomplished by having the router send an IGMP query message onto the subnet to which a host will
reply with the group membership information; we will look at this process in more detail shortly. Based on this
www.ebook-converter.com
information the routing of multicast data will be altered accordingly.
www.ebook-converter.com
Figure 14-9. Host Leaving a Multicast Group
IGMP has three versions (1, 2, and 3), and in order for a router to interop, just make sure you are using the right
version! Juniper Networks routers support all three versions. Version 3 inherently provides interoperability with versions
1 and 2. Also, the default version of IGMP, unless specified, is version 2. IGMP is defined in the following documents:
RFC 1112, “Host Extensions for IP Multicasting” (defines IGMP Version 1)
RFC 2236, “Internet Group Management Protocol, Version 2”
“Internet Group Management Protocol, Version 3,” draft-ietf-idmr-igmp-v3-01.txt
Configuring IGMP
In JUNOS the presence of IGMP is activated by default on broadcast interfaces once you turn on a multicast routing
protocol. This is an extremely intelligent implementation of IGMP by Juniper Networks. You are thus freed from
configuring the background communication of the dynamic routing protocol when, say, DVMRP or PIM is activated,
567
14. Multicast Protocols
As you are by now aware, the various configuration options are accessible as you have entered into the IGMP protocol
edit mode. In this instance IGMP provides you with the ability to activate it by interface (all are now on, unless an
interface is specified). The example below shows the parameters that can be set, but we strongly suggest that you do not
alter the defaults unless necessary and only after careful consideration. Consult the Juniper Networks documentation for
the operational range of each parameter and the impact possible to your network.
[edit protocols igmp]
Lab@Chicago# set ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
> interface Interface options for IGMP
query-interval When to send host-query messages (1..1024 seconds)
query-last-member-interval When to send group query messages (seconds)
query-response-interval How long to wait for a host-query response (seconds)
robust-count Expected packet loss on a subnet (2..10)
> traceoptions Trace options for IGMP
www.ebook-converter.com
The following example shows an executed show igmp interface command. By default, JUNOS activates IGMP
on all router interfaces if none are specified in edit mode.
Lab@Chicago> show igmp interface
Interface State Querier Timeout Version Groups
fe-0/0/0.0 Up 192.168.254.70 None 2 1
fe-0/0/1.0 Up 51.0.0.1 None 2 0
fe-0/0/2.0 Up 10.0.0.1 None 2 0
Configured Parameters:
IGMP Query Interval (1/10 secs): 1250
IGMP Query Response Interval (1/10 secs): 100
IGMP Last Member Query Interval (1/10 secs): 10
IGMP Robustness Count: 2
Derived Parameters:
IGMP Membership Timeout (1/10 secs): 2600
IGMP Other Querier Present Timeout (1/10 secs): 2550
568
14. Multicast Protocols
well!
Lab@Chicago> show igmp statistics
IGMP packet statistics for all interfaces
IGMP Message type Received Sent Rx errors
Membership Query 9 42 0
V1 Membership Report 17 0 0
DVMRP 0 0 0
PIM V1 0 0 0
Cisco Trace 0 0 0
V2 Membership Report 0 0 0
Group Leave 0 0 0
Mtrace Response 0 0 0
Mtrace Request 0 0 0
Domain Wide Report 0 0 0
V3 Membership Report 0 0 0
Other Unknown types 0
IGMP v3 unsupported type 0
IGMP v3 source required for SSM 0
IGMP v3 mode not applicable for SSM 0
IGMP Global Statistics
Bad Length 0
Bad Checksum 0
Bad Receive If 0
Rx non-local 9
Lab@Chicago>
You can use the show igmp statistics command to see not only all the IGMP processes running, but, if you
www.ebook-converter.com
recall, OSPF also uses multicast, and the multicast OSPF-assigned addresses show up in this command, giving you a
nice way to see OSPF's operation in the most unlikely place. As the network is running IGMP and OSPF to the same
neighbor, the entries are there for each multicast address (IGMP, IGMP Group, OSPF ALL, OSPF DR). Specifically,
the use of the show igmp group brief command shows you the multicast addresses that are being used on a per-
interface basis.
Lab@Chicago> show igmp group ?
Possible completions:
<[Enter]> Execute this command
<group-name> Show a particular IGMP group
brief Show brief view
detail Show detail view
| Pipe through a command
569
14. Multicast Protocols
The output below shows the actual OSPF neighbors that are present.
Lab@Chicago> show ospf neighbor
Address Interface State ID Pri Dead
192.168.254.253 fe-0/0/0.0 Full 10.10.10.10 1 33
10.0.0.2 fe-0/0/2.0 Full 10.0.0.2 128 34
51.0.0.2 fe-0/0/1.0 Full 51.0.0.2 128 38
Lab@Chicago>
Multicast Routing
Networks of all types are constructed of myriad subnets provided connectivity by routers at Layer 3. The importance of
knowing who you are (source IP address) and where you are going (destination IP address) is how IP unicast routing
operates. This is a rather simplistic way of explaining how IP routing works; however, that is okay for purposes of
comparing and explaining how multicast routing works. The IP routing procedure is relatively straightforward, but the
fundamental point to keep in mind is the binding of a single address to a single host.
Multicast routing, however, is a bit more complex than IP routing because a multicast address identifies a multicast
group instead of a physical destination. An individual host is able to join a multicast group by using IGMP to
communicate the join message to its LAN router. Because the number of receivers for a multicast session can be quite
large, the source of the multicast transmission does not need to know all the relevant destination addresses of the hosts
that have elected to receive (i.e., join) the multicast session. The routers only need to know that on a given LAN, there
is at least one host interested in this multicast group. The basic principal involved in multicast routing is that routers
interact with each other to exchange information about neighboring multicast routers.
To avoid duplication of effort, a single router is selected (via IGMP) as the DR for each physical network. The DR
constructs a tree from the source that connects each IGMP interface (port) reporting group members to the multicast
www.ebook-converter.com
group. This tree stretches throughout your WAN and is also referred to as the spanning tree, distribution tree, and
source tree.
The tree employs technology to ensure that it is loop-free in nature. Figure 14-10 shows a tree that has no loops and also
compares a normal IP routing structure based on subnets (left) and a multicast distribution tree (right).
www.ebook-converter.com
source(s) to all receivers, and shared trees may introduce extra delay in your network. Notice in Figure 14-11 that the
shared root router D has induced an additional two hops from source 1.
571
14. Multicast Protocols
www.ebook-converter.com
network and that available bandwidth is plentiful. Multicast routing protocols that rely on this mode will use periodic
flooding to set up and maintain their distribution trees. Examples of protocols that use dense mode are DVMRP,
MOSPF, and Protocol-Independent Multicast—Dense Mode (PIM-DM).
A sparse-mode approach is based on the assumption that multicast group members are sparsely distributed across the
network and that available bandwidth is not plentiful. Sparse mode addresses concerns opposite to those addressed by
dense mode and is typically used when multicasting across multiple routing domains, including Internet scenarios. An
important design and use point is that sparse mode does not imply that a group has few members, just that they are
widely dispersed. This means that sparse mode will not use flooding to accomplish the creation of its distribution tree;
instead, it will use more selective techniques, which we will discuss in that protocol-specific section. Sparse-mode
routing protocols include Core-Based Trees (CBT) and Protocol-Independent Multicast—Sparse Mode (PIM-SM).
PIM-SM is the most common multicast technology used on the Internet today.
In conclusion, if you are trying to decide which PIM mode to use and when, many networks with a lot of multicast users
on a LAN should use PIM-DM. Enterprise networks with heavy multicast transmission needs. Service providers should
use PIM-SM.
www.ebook-converter.com
export-rib inet.2;
import-rib inet.2;
}
}
}
As the above example shows, we can create a rib-group to hold our multicast routes, and once that occurs, the
group can then be used by a multicast protocol.
573
14. Multicast Protocols
www.ebook-converter.com
efficient distribution tree, it is ideal as an enterprise or single routing domain solution; dense mode does not scale well
across the Internet, which is, of course, why you do not use it there.
DVMRP
The first multicast protocol designed specifically to support multicast routing was DVMRP, which is described in RFC
1075. DVMRP was the first true multicast routing protocol to see widespread use. Based on Steve Deering's seminal
work, DVMRP is similar in many ways to Routing Information Protocol (RIP) with some minor variations added to
support the unique requirements of multicast. Some key characteristics of DVMRP include the following:
Distance-vector-based (similar to RIP)
Periodic route updates (every 60 seconds)
Infinity = 32 hops (versus 16 for RIP)
Poison reverse has special use in multicasting
www.ebook-converter.com
distribution tree provides a shortest path between the source and each multicast receiver in the group, based on the
number of hops in the path, which is the DVMRP metric. A distribution tree is constructed on demand, using the
broadcast-and-prune technique.
When a router receives a multicast message, it checks its unicast routing tables to determine the interface that provides
the shortest path back to the source. If this was the interface over which the multicast message arrived, then the router
enters some state information to identify the multicast group in its internal tables (specifying interfaces over which
messages for that group should be forwarded) and forwards the multicast message to all adjacent routers, other than that
which sent the message. This mechanism, called reverse path forwarding, or RPF, ensures that there will be no loops in
the distribution tree.
Figures 14-14 to 14-16 show how DVMRP works. In Figure 14-14, DVMRP floods IGMP messages out from the course
throughout the entire network.
www.ebook-converter.com
www.ebook-converter.com
next section will look at the basics involved in configuring DVMRP.
Configuring DVMRP
This section describes how to configure DVMRP on a Juniper Networks router. By default, DVMRP is disabled, and
interfaces that can route DVMRP can either be physical or tunnel to support the connecting of multicast domains like
those discussed in Section 14.1. You will also need to create a separate routing table for DVMRP routes, as this section
will show.
Note
According to the JUNOS 5.0 documentation, you can configure DVMRP for either forwarding or unicast
routing modes. In forwarding mode, DVMRP operates its protocol normally (for example, it does the routing
as well as the multicast data forwarding). In unicast routing mode, you can use DVMRP for unicast routing
only; the actual forwarding of multicast data is done by enabling PIM on that interface. If you have
configured PIM on the interface, you can configure DVMRP in unicast routing mode only. You cannot
configure PIM and DVMRP in forwarding mode at the same time.
[edit routing-options]
Lab@Chicago# set interface-routes rib-group IN_FOR_MCAST
[edit routing-options]
Lab@Chicago# set rib-groups OUT-DVMRP import-rib inet.2
[edit routing-options]
Lab@Chicago# set rib-groups OUT-DVMRP export-rib inet.2
[edit routing-options]
Lab@Chicago# show
interface-routes {
rib-group inet OUT-DVMRP;
}
rib-groups {
IN_FOR_MCAST {
import-rib inet.0;
}
OUT-DVMRP {
export-rib inet.2;
import-rib inet.2;
}
}
To activate DVMRP, enter the [edit protocols] hierarchy level and edit DVMRP as shown below:
www.ebook-converter.com
[edit protocols]
Lab@Chicago# edit dvmrp
578
14. Multicast Protocols
multicast properly. The following example shows how to do this:
[edit protocols dvmrp]
Lab@Chicago# set rib-group OUT_DVMRP
Lab@Chicago#
To activate DVMRP on an interface, you execute the set command, as shown below. You could also use the all
keyword to activate DVMRP on every interface on the router.
[edit protocols dvmrp]
Lab@Chicago# set interface ?
Possible completions:
<interface_name> Interface name
[edit protocols dvmrp]
Lab@Chicago# set interface fe-0/0/1
Lab@Chicago#
The final configuration for IGMP and DVMRP is as follows:
routing-options {
interface-routes {
rib-group inet IN_FOR_MCAST;
}
rib-groups {
IN_FOR_MCAST {
import-rib [ inet.0 inet.2 ];
}
OUT-DVMRP {
export-rib inet.2;
www.ebook-converter.com
import-rib inet.2;
}
}
}
protocols {
igmp;
dvmrp {
rib-group inet OUT-DVMRP;
interface fe-0/0/1.0;
}
This configuration has successfully activated IGMP and DVMRP on a Juniper Networks router—at least we hope so.
The next section gives us the tools necessary to verify the correct operation.
www.ebook-converter.com
* 51.0.0.0/24 D 0 >fe-0/0/1.0
D 0 >fe-0/0/1.0
* 51.0.0.1/32 L 0 Local
* 192.168.254.0/24 D 0 >fe-0/0/0.0
* 192.168.254.70/32 L 0 Local
Lab@Chicago>
This command provides you with an abbreviated high-level view of the contents of the routing table; you can see simple
things, like if a route is active, as well as the destination network, metric, and next-hop—all crucial bits for effective
routing.
580
14. Multicast Protocols
2. PIM-SM for sparsely distributed multicast groups
Dense-mode routing protocols all rely on the periodic flooding of messages throughout the network with the assumption
that every router wants to be a part of the multicast group. This approach can be quite effective under certain
circumstances; however, it is not without its problems and drawbacks. For example, consider what would happen to a
network if several thousand different multicast conferences started at once. The network would get quite busy!
Clearly a different solution is needed for group members widely dispersed across a WAN. While dense-mode protocols
use a data-driven approach to construct multicast distribution trees, sparse-mode protocols use a receiver-initiated
process; that is, a router becomes involved as part of a multicast distribution tree only when one of the hosts on its
subnet requests membership in a particular multicast group.
In sparse mode, routers must join the distribution tree explicitly because other routers do not automatically forward
multicast traffic. When a host joins a multicast group the local LAN router sends a join message to the router that has
been designated as the rendezvous point (RP) for the multicast group. This RP designation for a router is similar to the
DR designation that we discussed in Section 14.4. In sparse mode, the RP serves as the root of the shared multicast
distribution tree. The RP router is responsible for forwarding multicast data from different sources to those who have
joined the group and, thus, elected to receive it. The following sections describe these two modes.
PIM-DM
PIM-DM is similar to DVMRP. Both protocols employ reverse path multicasting (RPM) to construct source-rooted
distribution trees. The major differences between DVMRP and PIM-DM are that PIM is completely independent of the
unicast routing protocol used on the network, while DVMRP relies on specific mechanisms of the associated unicast
routing protocol. PIM-DM is also less complex than DVMRP. Some key characteristics of PIM-DM are as follows:
PIM-DM uses an underlying unicast routing protocol (RIP, IGRP, OSPF) to build its multicast routing tables, which
is one of the strongest reasons that PIM is replacing DVMRP.
www.ebook-converter.com
A router running PIM assumes that all other routers want to forward multicast packets for a group.
If a router receives a multicast packet and has no directly connected members or no PIM neighbors, a prune packet
is sent back to the source.
PIM-DM creates a source-based multicast distribution tree.
PIM-DM is used when bandwidth is plentiful.
PIM-DM is defined in draft-ietf-idmr-pim-dm-spec-05.txt.
www.ebook-converter.com
Figure 14-18. PIM Pruning
582
14. Multicast Protocols
In Figure 14-18 the network between routers B and C is pruned because it does not complete the RFP neighbor
requirements. Also, during this time, routers E and I get pruned as well because they do not have receivers.
In Figure 14-19, receiver 3 has entered the multicast group and the graft request is being sent to make receiver 3 part of
the tree.
This series of figures demonstrate the process that PIM goes through upon activation of a new multicast group, flooding,
pruning, and possibly grafting. The next section will look at how basic PIM-DM is configured on a Juniper Networks
router.
Configuring PIM-DM
This section describes how to configure PIM-DM on a Juniper Networks router. By default, on a Juniper Networks
router, PIM operates in dense mode. The configuration here will be the basic configuration from which you can alter its
mode of operation should you desire to operate in PIM-SM, which we will be discussing in Section 14.5.2.2. Keep in
mind that with PIM you do not need to configure a separate routing table because PIM is protocol-independent and
designed not to rely on an IP unicast routing protocol like DVMRP was. You can, however, create a routing table just
for multicast data if you want, although it is unnecessary.
As with all protocols in JUNOS software, you must activate the protocol by telling the router which interfaces it should
operate over as shown below:
[edit protocols]
Lab@Chicago# edit pim
www.ebook-converter.com
protocols {
igmp;
ospf {
area 0.0.0.0 {
interface fe-0/0/0.0;
}
area 0.0.0.10 {
interface fe-0/0/2.0;
}
area 0.0.0.51 {
interface fe-0/0/1.0;
}
}
pim {
interface all;
}
}
Downloader demo watermarks
There are a couple of configuration tips and JUNOS implementation nuances that you should be aware of with PIM
when it is operating in dense mode.
All PIM routers on the same subnet must run the same version of PIM.
583
14. Multicast Protocols
A PIM-enabled interface has a default priority of 1, which is the lowest priority; thus, the likelihood of it becoming
the PIM DR is reduced.
There are additional considerations if you are running PIM-SM, which we will discuss in Section 14.5.2.2.
www.ebook-converter.com
The following command output is very useful in determining the status of your PIM neighbors and their address. When
trying to determine the flow of the multicast event, this is a great place to start as it's only going to neighbors!
Lab@Chicago> show pim neighbors
Interface DR priority Neighbor addr V Mode Holdtime Timeout
fe-0/0/1.0 1 51.0.0.2 2 Unknown 105 98
fe-0/0/2.0 1 10.0.0.2 2 Unknown 105 79
PIM-SM
PIM-SM is referred to as protocol-independent, just like PIM-DM. In fact, both are independent of the underlying
routing protocol; they just function in different ways. PIM-SM does not flood like a dense-mode protocol, and it has an
RP. The RP keeps track of multicast groups by requiring that they register before any traffic gets transmitted. From a
host's perspective they register with their directly connected router, which in turn registers them to the RP. The RP then
sends a join message towards the source of the multicast transmission. At this point, packets are forwarded on a shared
distribution tree. If the multicast traffic from a specific source is sufficient, the receiver's first-hop router may send join
messages toward the source to build a source-based distribution tree. A RP has the following characteristics:
Downloader demo watermarks
The RP can be selected statically or by allowing the network to determine it dynamically.
It is used to keep track of multicast group.
A multicast source is registered with the RP by the source's first hop router.
584
14. Multicast Protocols
Some of the key operational characteristics of PIM-SM are as follows:
PIM-SM assumes that the source and destination are distant and is more appropriate for WAN links where
bandwidth is limited.
It is similar to PIM-DM, but requires an explicit join message from downstream receivers instead of assuming that
all receivers want to receive traffic.
Its multicast tree is built around a central RP.
Members who want to receive the multicast graft themselves to the RP.
PIM-SM is defined in the following documents:
RFC 2362, “Protocol Independent Multicast-Sparse Mode (PIM-SM): Protocol Specification.”
“Anycast RP Mechanism Using PIM and MSDP,” Internet draft, draft-ietf-mboned-anycast-rp-05.txt.
Bootstrap Router
The Bootstrap router (BSR) mechanism is used for PIM-SM to learn the multicast group mappings to the RP. As we
have discussed, the RP serves as a distribution point
Sparse mode uses a BSR, an RP, and a shared tree topology to route multicast traffic. Within multicast domains, the RP
serves as a distribution point for the router in a specific set of multicast groups. Each RP informs the BSR of the
multicast group it serves. The BSR collects the RP to multicast group mappings (RP-set) within its domain, builds a
database, and dynamically distributes the RP information to the multicast routers within its domain.
Configuring PIM-SM
www.ebook-converter.com
This section will discuss how to configure PIM-SM on a Juniper Networks router. As mentioned earlier, the default
mode of operation is dense mode. Instead of rebuilding our PIM configuration, we will specify the mode of operation.
Note, however, that we do this on a per-interface basis and not globally. Plus, it is done in interface configuration mode.
The following example shows the completions for the set interface all command:
[edit protocols pim]
Lab@Chicago# set interface all ?
Possible completions:
<[Enter]> Execute this command
+ apply-groups Groups from which to inherit configuration data
disable Disable PIM on this interface
hello-interval Hello interval (0..255 seconds)
mode Mode of interface
priority Hello option DR priority (0..4294967295)
version Force PIM version (1..2)
| Pipe through a command
Downloader demo watermarks
Lab@Chicago#
This example shows the completions for the set interface all mode command:
[edit protocols pim]
Lab@Chicago# set interface all mode ?
585
14. Multicast Protocols
Possible completions:
dense Dense mode
sparse Sparse mode
sparse-dense Sparse-dense mode
Lab@Chicago#
This command sets all interfaces on the router to be in PIM-SM.
[edit protocols pim]
Lab@Chicago# set interface all mode sparse
Lab@Chicago#
In this command output we will take a quick look at what we have configured by running a show command, which will
show us what our configuration is within that configuration level:
[edit protocols pim]
Lab@Chicago# show
interface all {
mode sparse;
}
www.ebook-converter.com
A PIM-enabled interface has a default priority of 1, which is the lowest. Thus, the likelihood of it becoming the
multicast DR is reduced.
RP can be modified to force election of a router.
There is a reduced set of operational and implementation considerations that are relevant if you are running PIM dense
mode that we discussed in that section.
586
14. Multicast Protocols
requirements place new challenges on today's providers. Specifically let's address some of them here to help us
understand the technologies that we will be discussing.
One specific area of concern is that PIM-SM requires only one active RP within a multicast group. Obviously, ISPs do
not want to rely upon a third-party RP, so they must have their own RP for each multicast group. Another area of
concern revolves around business factors, and there are many of them. Suffice it to say that an ISP and its customers are
better served when the RP is within their AS (e.g., under their control). The final point we will mention is that ISPs may
want to control traffic within their network to ensure effective utilization. Consider that unicast traffic might have a
certain set of policies applied, when a different set of policies is needed for multicast.
Yes, there are ways around this issue using the technologies presented so far; however, they have fallen short, and in
many cases, the factors behind using them are not strong enough for them to be considered permanent solutions. As a
result two technologies have emerged to address this concern: MSDP and MBGP, which are addressed in the Sections
14.5.3.1 and 14.5.3.2, respectively.
MBGP creates extensions to the widely used BGP to support this requirement. MBGP adds a multicast-only
reachability table to the existing unicast reachability table of BGP. With MBGP, a router can effectively have two BGP
tables, one for multicast and one for unicast. Routers can be configured to look first at the multicast reachability table
when making RPF checks. If a network is not in the multicast reachability table, it will then use the unicast routing
protocol to perform the RPF. Experienced BGP users should have no difficulty learning to configure and maintain the
extensions of MBGP. Furthermore, MBGP is backward compatible with BGP.
MSDP
MSDP is a protocol allowing the connection of multiple PIM-SM domains. If you recall the discussion about mbone at
the beginning of the chapter, it is actually composed of multicast islands. Consider for a moment that in the Internet an
mbone multicast island is analogous to an AS. Keep this analogy in mind as we discuss the way MSDP can be used as a
solution.
www.ebook-converter.com
MSDP allows the multicast sources for a multicast group to be known to all RPs in different multicast domains. Each
PIM-SM domain uses its own RPs and need not depend on RPs in other domains. An RP runs MSDP over TCP to
discover multicast sources in other domains.
An RP in a PIM-SM domain has an MSDP peering relationship with MSDP-enabled routers in another domain. The
peering relationship occurs over a TCP connection, where primarily a list of sources sending to multicast groups is
exchanged. The TCP connections between RPs are achieved by the underlying routing system (BGP). The receiving RP
uses the source lists to establish a source path. Through these peerings, RPs exchange source active (SA) messages,
which describe all of the registered sources within their respective domains. In this way, RPs learn all of the active
sources from other domains, in addition to the sources from their own domain.
Configuring MSDP
When you set out to configure MSDP on your Juniper Networks routers, you will have a variety of options. As an
introduction, this book will discuss the basic MSDP configuration; additional configuration options can be found in the
Juniper Networks multicast documentation.
587
14. Multicast Protocols
[edit protocols msdp]
Lab@Chicago#
MSDP also requires the configuration of peers, and there must be at least one peer configured for proper operation. We
can see the configuration as shown below:
[edit protocols msdp]
Lab@Chicago# set peer 30.30.30.1
MBGP
MBGP is the other technology used to provide connectivity between different multicast domains. Now, many people
think MBGP means Multicast BGP, and in fact it does not. The regular BGP that we all know and love was designed for
IPv4, which while a great idea, left many protocols unsupported. RFC 2283 defined MBGP and states that the use of
MBGP will allow BGP to carry different routing information for multiple network layer protocols (e.g., IPv6, IPX). You
would use MBGP when ISP-to-ISP multicast peering was needed or if your network was multihomed to two different
providers. For the purposes of multicast, MBGP uses a wide variety of BGP characteristics to provide connectivity for
multicast groups between different domains. Some of its characteristics are as follows:
Unicast and multicast routes can be carried in the same BGP session.
www.ebook-converter.com
It uses the same route-selection criteria as BGP, while allowing access to the same attributes.
Different policies and topologies are possible for unicast and multicast.
This chapter presents just a few of the more important characteristics to be aware of. MBGP accomplishes the
advanced ability of adding several new multiprotocol attributes, specifically the following:
MP_REACH_NLRI—defines and carries the reachable prefixes and the next-hop address for that prefix
MP_UNREACH_NLRI—defines and carries the unreachable prefixes and the next-hop address for that prefix
These multiprotocol attributes allow multicast to be carried along with unicast traffic. The actual use of these attributes
is reflected in the presence of multicast routes in the inet.2 routing table, as we have already discussed.
The presence of an internal multicast routing protocol for internal routing is still needed. Juniper Networks recommends
the use of PIM-SM to build the multicast distribution trees and provide the mechanism for forwarding multicast traffic.
In Section 14.5.2.2, we discussed the operation and configuration of PIM-SM.
Configuring MBGP
BGP uses NLRI, as was discussed in Chapter 9. When using MBGP for multicast, the challenge is getting BGP to carry
588
14. Multicast Protocols
NRLI information for the multicast routes. You can configure the router for MBGP by individual BGP peer or for an
entire group. In the following configuration example, we can activate MBGP as shown:
[edit]
Lab@Chicago# edit protocols bgp group MCAST neighbor 30.30.30.1 family inet ?
Possible completions:
<[Enter]> Execute this command
> any Include unicast or multicast NLRI
> multicast Include multicast NLRI
> unicast Include unicast NLRI
| Pipe through a command
[edit]
Lab@Chicago#
The default configuration is unicast; if you want to cons a peer for just multicast, you select the multicast option. If,
however, you want to run both IP unicast and multicast, then use the any keyword. A configuration for MBGP and
unicast would look similar to the following sample:
[edit protocols bgp group MCAST]
Lab@Chicago# show
neighbor 30.30.30.1 {
family inet {
any;
}
}
www.ebook-converter.com
As discussed in Part III, JUNOS has multiple routing tables and families of protocols. When you complete the above
configuration of MBGP, the multicast routes learned are placed into a separate routing table from the unicast routes, as
we discussed. An address family indicator (AFI) and a subaddress family indicator (SAFI) identify each of these routing
tables and families of protocols. JUNOS supports the following:
AFI inet and SAFI 1 for unicast routes
AFI inet and SAFI 2 for multicast sources
AFI inet and SAFI 3 for both unicast and multicast prefixes.
Consider, then, if BGP receives a unicast prefix with SAFI 1, it places this route into the inet.0 routing table, SAFI 2
prefixes go into inet.2, and SAFI 3 prefixes go into both routing tables. This is important to note as the prefixes
present in inet.2 are those sent to MBGP peers. Of course, you can also set a policy to import or export routes
between the routing tables if that functionality is needed.
Chapter Summary
Downloader demo watermarks
This chapter introduced and discussed the more important aspects of multicast. It provided an overview of the most
popular and widely implemented multicast routing protocols both currently and historically. This chapter discussed and
compared the differences between PIM-DM and PIM-SM, as well as looking at how multicast evolved through
DVMRP.
While comparing and contrasting the differences between their modes of operation, each of the protocols was covered
589
14. Multicast Protocols
with a focus on the method of configuring it on a Juniper Networks router. The needs of multicast to be distributed
properly between different ASs through the use of MSDP and MBGP were also examined.
This chapter was an introduction to multicast and its brief entry into the world of multicast. Additional information on
multicast and Juniper Networks can be found in Brian Edwards and Leonard A. Giuliano's Interdomain Multicast
Routing: Practical Juniper Networks and Cisco Systems Solutions, my favorite in the Juniper Networks
documentation.
Bibliography
www.ebook-converter.com
591
[ch14bib15] Beau Williamson,. Developing IP Multicast Networks: The Definitive Guide
to Designing and Deploying CISCO IP Multicast Networks. Cisco Press, <year>2000.
</year>
www.ebook-converter.com
Introduction to Troubleshooting
Troubleshooting can best be described as the process of finding the root cause of a system problem by
methodically working from a broad spectrum of possibilities and narrowing them down to a final solution.
Most network engineers have some personalized method of troubleshooting that they instinctively use
whenever a problem occurs. Some prefer to look at the big picture—how broad is the problem, which remote
www.ebook-converter.com
sites are being affected, and so forth. Some engineers like to keep a knowledge base of information about past
network outages so they can do quick searches for relevant information. Some engineers, of course, use a
combination. Troubleshooting can be described as both an art and a science, using proven scientific methods
in a uniquely personal way to achieve the fastest, best result.
Many engineers prefer to use the bottom-up philosophy based on the OSI network model (refer to Figure 2-1
and its accompanying text for a review of the OSI model). By using Layers 1 through 3—physical, data link,
and network—the engineer can dissect and analyze a problem in a methodical fashion.
Using this model, the engineer would first assess the physical layer of the network, asking the following
questions:
Is everything connected physically?
Are there any utility outages, such as a fiber cut?
Are all indicators normal?
Downloader demo watermarks
Are there any active alarms?
The next step would be to assess the link layer, or Layer 2, indicators for framing errors, transmit and receive
errors, and so on. Finally, Layer 3, the network layer, is where the engineer could gather information
necessary for understanding the routing information that is being passed or received by the router. Using this
593
15. Troubleshooting Juniper Networks Routers
model, each layer represents another way of analyzing the problem until all methods have been exhausted or
until the problem is found and resolved.
Another troubleshooting method many engineers use involves finding out what, if any, changes were made in
the network since it was last known to be stable. Then, the method is to work backwards from the current
situation until reaching the point at which the network restabilizes. Sometimes a software upgrade is found to
be the cause of the problem. More often, though, a configuration change is the root cause.
Regardless of the method used, the goal is to get the network running smoothly again as quickly as possible.
The JTAC prescribes a tried-and-true troubleshooting method for networks using their routers. The following
sections discuss this troubleshooting methodology, describe trouble indicators, and introduce hardware
troubleshooting commands.
www.ebook-converter.com
Identify the Symptoms
What exactly is leading you to believe there is a network or router problem? Are there alarms or LEDs
illuminated on the router? Do you see information on the craft interface that indicates a problem? We will
cover both of these types of indicators in this section. Perhaps it is a network outage that first alerts you to a
problem. It could be a kind of catastrophic event that does not allow for normal trouble indicators to let you
know that a situation is beginning to occur. It is vital that you begin to act as soon as the symptom of a
problem is noted.
594
15. Troubleshooting Juniper Networks Routers
www.ebook-converter.com
unrelated (printer problems, for example), work each problem separately and according to its priority (e.g.,
total network outages before user problems). Draw on your own experience or the experience of the staff to
brainstorm quickly. Ask questions: Have you seen this happen before? If so, under what conditions? No one
can be aware of every occurrence in a large network. It is helpful to leverage everyone's knowledge.
TIP
Use the logging feature on your terminal session to capture every keystroke.
Trouble Indicators
www.ebook-converter.com
In this section we discuss various ways that you can gain clues to network problems from the Juniper
Networks router itself. The router is designed in such a way as to provide real-time, accurate information on
the status of the router's components, the status of network reachability, in some instances, and so on. Juniper
Networks routers provide this information in three ways: system LEDs, the craft interface LCD display (on
some models), and SNMP traps.
LEDs
As discussed in Chapter 3, each Juniper Networks router has a craft interface on the front of the router
chassis. The craft interface contains the system LEDs that indicate the overall status of the router
components. The LEDs shown in Figure 15-3 include the following:
Alarm LEDs
Routing engine LEDs
596
15. Troubleshooting Juniper Networks Routers
www.ebook-converter.com
Over each number corresponding to an FPC slot there are also OK and Fail LEDs. In normal operational
status, the OK LED will remain illuminated solid and green. If it is blinking, it indicates that the FPC is
initializing. If the Fail LED should illuminate solid and red, it indicates that the router has lost contact with the
FPC. This could indicate a hardware failure or an improperly inserted FPC.
Other LEDs are contained on the components themselves. For instance, the power supplies each have OK
and Fail LEDs. There are instances in which a given router condition, such as increased temperature, can
generate a red alarm and shut down one or both power supplies. Specific information about troubleshooting
each hardware component of the Juniper Networks routers can be found in your hardware installation manual
or online at www.juniper.net.
SNMP Traps
If you desire, SNMP can be enabled on the router. SNMP can then send traps, or alerts, to an NMS when
certain conditions or events occur on the router. The NMS can be configured to alert network-engineering
www.ebook-converter.com
Figure 15-4. SNMP Traps
Using SNMP traps and an NMS should be part of a proactive network-management environment. By
proactive, we mean that it is always better to monitor the health of the routers and the network overall
constantly and consistently than to be surprised by a network outage. If the master power supply in New York
fails, and a redundant power supply is available, the system will continue to operate by failing over to the
backup power supply. If the master power supply fails and no one is alerted, the backup power supply could
fail at some point and leave the router completely down. By using the SNMP traps, the initial problem can be
resolved before a more major problem occurs.
Remote Craft Interface Monitoring on the M40, M40e, and M160 Routers
When it is impossible to be in front of the router you wish to troubleshoot, it is handy to be able to view
virtually the information that is currently being displayed on that router's craft interface. Note that this is only
true for data that is displayed on an M40, M40e, or M160 router equipped with an LCD display on the craft
interface. The following command can be used in JUNOS view privilege mode from a terminal session to
retrieve this data:
lab@Chicago> show chassis craft-interface
This command would offer output similar to that displayed below. Notice that there are no alarms and no
known problems on this M20 router. Because there is no LCD screen on the craft interface of the M20 router,
this command is the only way to discover this information. There are FPCs present in every available slot,
again, with no problems.
Red alarm: LED off, relay off
Yellow alarm: LED off, relay off
Host OK LED: On
Host fail LED: Off
FPCs 0 1 2 3
-------------------
Green * * * *
www.ebook-converter.com
Red . . . .
LCD screen:\LCD Screen:
New York
Up: 10+7:05:32
Temperature OK
Each router type has a different output for this command. Please refer to your JUNOS software configuration
manual or go online to the Juniper Networks Web site at www.juniper.net/techpubs/software.html.
Chassis Alarms
We mentioned chassis alarms earlier in Section 15.3.1. You can also gather this information remotely. A
chassis alarm is defined as an alarm that originates in a router component, such as the power supply. If a
power supply fails, a chassis alarm will be generated. Of course, on the M40, M40e, and M160 models, which
599
15. Troubleshooting Juniper Networks Routers
Tables 15-1 and 15-2 show the output you will see for each type of alarm for models M5, M10, M20, and
M40 and for model M160.
Table 15-1. Chassis Alarm CLI Output for Models M5, M10, M20, and M40
www.ebook-converter.com
RED ALARM – fan-name Failure
YELLOW ALARM – fan-name Removed
RED ALARM – Too many fans missing or
Fan failure
Fan removed
Fan(s) missing
failing
YELLOW ALARM – Temperature Warm Internal chassis temperature greater than
65°C
RED ALARM – Temperature Hot greater than 75°C Internal chassis temperature
RED ALARM – Temperature sensor failure Internal chassis temperature-sensor failure
YELLOW ALARM – PEM pem-number Removed Power supply removed
RED ALARM – PEM pem-number High Temperature Power supply too hot
RED ALARM – PEM pem-number Output Failure Power-supply output failed
RED ALARM – PEM pem-number Input Failure Power-supply input failed
RED ALARM – SFM sfm-number Failure Switch fabric module failed
RED ALARM – SFM sfm-number Removed Switch fabric module removed
RED ALARM – Host host-number Failure Host module failed
Power-Supply Monitoring
600
15. Troubleshooting Juniper Networks Routers
It is important to check the power supplies on the routers regularly. Although all Juniper Networks M-Series
routers have redundant power supplies, it is critical that you know the status of all power supplies at all times.
Doing so will help to head off any future total failure of the router if one power supply is nonfunctional and
the standby (which has become the master) fails.
There are three ways to monitor the power supply for operational status:
1. Using the show chassis craft-interface command, as described in Section 15.4.1.1
2. Using information gained from SNMP traps on the NMS, as described earlier in Section 15.3.2
3. Using visual inspection, which is our primary focus in this section
Visual inspection can provide the status of the system LEDs, as was discussed earlier in Section 15.3.1, and of
the output on the LCD display of the craft interface on M40, M40e, and M160 models only. If the power
supply is functioning normally, you should see a solid green OK LED illuminated on the power-supply
faceplate, no system alarms, and no trouble indicated in the LCD display of the craft interface. Table 15-3
offers some tips on troubleshooting a power supply that is not functioning normally.
www.ebook-converter.com
securing the board.
If the LED does not indicate normal operation on the control board (more information is provided for
each model in Sections 15.4.3.1 to 15.4.3.4), the board may not be making solid contact with the
backplane. Try tightening the top and bottom screws to see if the problem resolves. If it doesn't, try
reseating and securing the control board.
If the control board doesn't appear to be functioning normally, the craft interface may be malfunctioning
as well. You may receive alarms about fans, impellers, or other system components when in fact these
components are working properly. If you encounter these issues, troubleshoot the control board.
The following sections address how to determine the status of the system control boards for each type of
Juniper Networks router by visually inspecting the LEDs.
Table 15-3. Power-Supply Troubleshooting
Applicable
Downloader demo watermarks
Symptom Possible Cause Possible Solution Router
Models
Status Fail Power supply has failed Try replacing it. If a new power supply works, M20, M40
contact Juniper Networks to return the faulty
LED is red power supply. If the new power supply does not
601
15. Troubleshooting Juniper Networks Routers
work, contact the JTAC. Applicable
Symptom
Status OK Possible Cause
Power supply has not yet Possible Solution
Router may not be fully initialized. Wait a few Router
M20, M40
initialized minutes. Models
LED is green
and blinking
Power supply Power supply may have failed Check for alarms. Check condition and status of All models
has no because temperature threshold power cables, UPS, and power source.
power; no exceeded or loss of power from
LEDs are lit source
OUTPUT OK Power supply has failed Try replacing it. If a new power supply works, M5, M10,
contact Juniper Networks to return the faulty M160
LED is blue power supply. If the new power supply does not
and blinking work, contact the JTAC.
www.ebook-converter.com
3.
4.
If the SSB is acting as master, the blue MASTER LED is illuminated and solid.
The left-most green STATUS LED blinks faintly when the SSB is operating and grows brighter when
many exception packets are being processed.
5. The right-most green STATUS LED flashes rapidly when I/O activity is occurring.
Downloader
3.
demo watermarks
Two amber STAT1 and STAT2 LEDs flash when internal diagnostics are running.
Monitoring Interfaces
Now that you have a little information about troubleshooting the chassis and the major hardware components
of the router, we want to spend some time talking about how to monitor the proper operational status of the
interfaces. There are two categories of interface monitoring and troubleshooting commands: static and
real-time.
Note that it is outside the scope of this chapter to list all possible interface-monitoring commands along with
their qualifiers, but you can find this information in your JUNOS operational command reference guide or
online in the Technical Documentation section of the Juniper Networks Web site at www.juniper.net.
www.ebook-converter.com
Static Monitoring
Static monitoring of the router interfaces refers to commands that are one-time, or snapshot, commands used
to capture a moment in time in the life of the router. Using a static command, you can see—at that one
second—what has transpired since the last clearing of the counters. You can also check the status of an
interface. You must remember, however, that once the response to the command appears on your screen, it is
immediately outdated. That does not mean that it is useless information. It simply means that you got a status
update.
The static monitoring commands for use on the router interfaces all start with the root command in operation
mode: show interfaces. You can optionally add the interface name, as well as the qualifiers detail or
extensive. The detail option provides detailed information on each interface. The extensive option
provides even more detail about the interfaces. The output for a simple show interfaces interface-
name command on an ATM interface is shown below:
lab@Chicago> show interfaces at-2/1/1
Downloader demo watermarks
Physical Interface at-2/1/1, Enabled, Physical link is UP
Interface index: 30 SNMP ifIndex: 13
Link-level type: ATM-PVC, MTU: 4482, Clocking: Internal, SONET mode,
Speed: OC3, Loopback: None, Payload scrambler: Enabled
Device Flags : Present Running
603
15. Troubleshooting Juniper Networks Routers
Link Flags : None
Input Rate : 0 bps (0 pps)
Output Rate : 0 bps (0 pps)
SONET alarms : None
SONET defects : None
Logical interface at-2/1/1.0 (Index 11) (SNMP ifIndex 56)
Flags: Point-to-Point Encapsulation: ATM-SNAP
Input packets: 0
Output packets: 0
VCI: 0.100
Flags: Active
Total down time: 0 sec, Last down: Never
In this example, you can see that there are no active SONET alarms or defects present. You can also gather
some information about the type of encapsulation in use and the I/O rate of the interface. The output of this
command will look a little different for each interface type. Refer to your JUNOS operational command
reference for details.
Short summary information, with much less detail, can be obtained by adding the terse option to the
command as shown below. Notice that you only see the status, protocol type, and the local and remote
addresses. If you need to quickly check the status of an interface, this is a good command to use.
lab@Chicago> show interfaces terse
Interface Admin Link Proto Local Remote
at-2/1/1 UP UP
www.ebook-converter.com
at-2/1/1.0 UP UP inet 10.1.1.1 10.1.1.2
at-2/1/1.100 DOWN DOWN
at-2/1/1.3748 DOWN DOWN
To obtain only descriptions of the interfaces, use the descriptions qualifier as shown below. As in the
above example, you will see the interface name, followed by its status, and a short description, as manually
entered. This can be helpful if you name your interfaces by location or another unique identifier. For instance,
in this example, the descriptions seem to identify a location and the PVC in use:
lab@Chicago> show interfaces descriptions
Interface Admin Link Description
at-2/1/1.0 UP UP Nassau-0
at-2/1/1.100 UP UP Nassau-100
at-2/1/1.3748 DOWN DOWN Nassau-3748
Using the show interfaces routing command gives you the routing information for each specific
interface. You can also include the optional qualifiers interface-name, brief (default), detail, and
www.ebook-converter.com
Physical interface: fe-1/0/0, Enabled, Physical link is UP
Interface index: 37, SNMP ifIndex: 14
Link-level type: Ethernet, MTU: 1514, Source filtering: Disabled
Speed: 100 mbps, Loopback: Disabled, Flow control: Enabled
Device flags: Present Running
Interface flags: SNMP-Traps
Link flags: None
Current address: 00:90:69:0e:0c:69, Hardware address: 00:90:69:0e:0c:69
Input rate: 0 bps (0 pps), Output rate: 0 bps (0 pps)
Active alarms: None
Active defects: None
MAC statistics:
Input octets: 0, Input packets: 0, Output octets: 0, Output packets: 0
Filter statistics:
Filtered packets: 0, Padded packets: 0, Output packet errors: 0
Autonegotiation information:
Real-time Monitoring
www.ebook-converter.com
Suppose you don't want just a status update. What if you need a running output that is continuously updated?
This is when you need real-time monitoring. There are two primary commands that can be used to monitor
router interfaces in real-time for immediate feedback: monitor interface and monitor traffic.
The monitor interface command shows statistics for a physical interface updated once per second.
You will also see the difference between the statistics at the beginning of the monitoring (or since you last
cleared the statistics) and the present update. This is quite helpful when troubleshooting an ongoing problem.
Another feature of this command is its ability to discover and display common interface problems like alarms
and framing errors. The usage for this command is as follows:
lab@Chicago> monitor interface <interface-name | traffic>
If you do not specify an interface name, you will get output for all interfaces. Adding the traffic qualifier
will provide you with traffic data (input and output packets per second, for example) for one or all interfaces.
606
15. Troubleshooting Juniper Networks Routers
Keystroke Action
C This key will clear the delta values of the statistics since the last time you cleared them or since
the monitor interface command was executed. It will not clear the cumulative statistics on
the interface.
F Use this key to “freeze” the display.
T Use this key to “thaw” a display that was frozen.
N The monitor interface command displays interfaces sequentially, in the same order in
which they would be displayed by the show interfaces terse command. You can use this
key to jump to the next interface in the sequence.
I This key allows you to specify a given interface to display. Using this key will cause the monitor to
prompt you for the name of an interface.
Q Use this key to quit monitoring.
The monitor traffic command can be compared to the UNIX command tcpdump, which also can be
used to display the traffic flowing through an interface. Using the monitor traffic command with
Boolean expressions, you can print and examine packet headers on traffic on an interface. The monitor
traffic command should be used with caution. If you do not use specific parameters to filter the output, it
could impact your router's performance, throughput, or both. If you have any questions about the use of this
command, contact JTAC before using it. In addition, you can refer to the Juniper Networks Web site or your
copy of the JUNOS documentation for software command reference documents for the version of JUNOS you
are using. Search for the section on the traffic match condition. The optional qualifiers that can be used
with the monitor traffic command are listed in Table 15-5, along with a short description of each.
Table 15-5. Optional Qualifiers for the monitor traffic Command
www.ebook-converter.com
Qualifier Description
absolute- Prints absolute TCP sequence numbers
sequence
brief The default; displays only the minimal protocol-related information, therefore keeping the tax
on the router to a minimum
count Allows you to specify a finite number of headers to display, which helps keep the capture short
and less space-intensive; ceases output once this limit is reached—the range is 1 to 1,000,000
detail Shows some detail—though not as much as extensive—such as TTL, from the TCP packet.
extensive Shows even more detail from TCP packets
NOTE
For detail and extensive to work with some protocols, you must increase the
size option to permit higher output for each packet matched by the monitor
traffic command.
interfaceSpecifies the interface on which to print the packet data; if no interface is specified, the
www.ebook-converter.com
can be used to perform diagnostics related to protocol status and network activity. Both can be CPU-intensive
on the router itself because of the power and memory it takes to examine and capture the volume of traffic
and tasks flowing through and taking place on today's high-speed routers. Enabling any kind of
traceoptions command on a Juniper Networks router can be detrimental to performance and should be
used with caution.
While the Cisco Systems' debugging commands are complex enough to warrant a separate command
reference, the traceoptions commands are simple yet powerful. Knowing how and when to use
traceoptions commands is a key skill in good troubleshooting. Each protocol section in this chapter will
discuss how to use them; knowing when to use traceoptions commands is partially based on experience.
If you find yourself in a troubleshooting scenario that requires some advanced techniques, try the
traceoptions commands. Using the traceoptions command set is a good way to become familiar
with how valuable it can be.
Note
608
15. Troubleshooting Juniper Networks Routers
Viewing traceoptions Output
This section will discuss protocol-specific information and how to get it later. Here it specifies what you need
to know to retrieve the output gathered by the traceoptions command. There are two ways to see this
information: by monitoring it in real-time or by viewing it from a saved file with the show log command.
The monitor command allows you to display the end of either a system log file or a trace file, along with
additional entries as they are being added. It can be a very valuable tool during active troubleshooting
because you can watch the output and receive immediate feedback on what is happening in the router or
network. The syntax of the monitor command is as follows:
lab@Chicago> monitor (start | stop) list
The list qualifier prompts the system to provide you with a list of log files from which to select. This list
will include not only traceoptions output files, but syslog-produced files as well. To stop the output,
enter <ESC>-Q.
The show log command can be used to list log files on the system, view the contents of the log files, or list
user logins. The syntax of this command is as follows:
lab@Chicago> show log [user username] [filename]
The user qualifier is optional, as is username. If you enter user and do not enter a username, you will
see logged information about all users with recent logins. The filename is also optional. If you identify a
filename, you will view the contents of that file. The use of no optional qualifiers simply provides a list of all
available log files that you can view. Here is an example of the show log output:
www.ebook-converter.com
lab@Chicago> show log user
lab ttyd0 Thu Apr 4 13:17 still logged in
ted ttyd0 Tue Apr 2 11:24 – 13:13 (2+01:49)
In this example, we see that on Chicago, two users are logged on. We see our session, user lab, and another
session, user ted. User ted has been online for 2 days, 1 hour, and 49 minutes. Notice that, because we are
still logged in, we do not see an accounting of the amount of time we have been logged in.
Parameter Description
files Allows you to specify a number of log files that can be created. In other words, if you set files
to 5, the system will create /var/log/rip-trace.0, then /var/log/rip-trace.1, and
so on, through .5. When the maximum number of files is reached, the system will overwrite the
first file in the series. The default for this parameter is to create one file only. The maximum
number that can be set is 1,000 files.
flag Allows you to flag the particular options you wish to trace. The possible choices are listed in
Table 15-7.
no-stampAn optional parameter that can be used when you do not want to have a timestamp on your
traces.
no- This allows only the user who created the file to access its contents.
world-
readable
replace This saves space by replacing a file of the same name that already exists. If you do not specify the
replace option, the new tracing will be appended to the file that already exists.
size This limits the amount of space consumed by the file. You can specify a range from 10KB
through the maximum file size supported by your hard disk. To specify KB, use k, as in 400k to
represent 400KB. Use m for MB and g for GB. The default size is 1MB. Once a file reaches its
limit, it will begin overwriting from the beginning of the trace.
www.ebook-converter.com
Table 15-7 lists the required and optional flag options you want to trace.
Table 15-7. Required and Optional flag parameters for the traceoptions Command
Options Description
all Required; enables all possible tracing operations
detail Optional; results in more detailed trace information
disable Optional; turns off the tracing operation preceding the disable flag
general Required; captures all normal operations and routing table changes (the equivalent of the
normal and route trace flags together)
normal Required; traces all normal operations
policy Required; captures all instances of policy operations
receive Optional; logs only packets being received
receive- Optional; logs details of packets being received
detail
www.ebook-converter.com
lab@Chicago# edit protocols rip
[edit protocols rip]
lab@Chicago# set traceoptions file filename <replace> <size size> <files
number> <no-stamp>
lab@Chicago# set traceoptions flag flag <flag-modifier> <disable>
The RIP protocol-specific flags can help narrow down the output that you receive. Table 15-8 lists each flag
and provides a short description.
The following example shows how to enable the trigger, request, and update flags for RIP:
[edit protocols rip]
lab@Chicago# set traceoptions file | rip-trace size 400k files 4 no-stamp
world-readable
lab@Chicago# set flag request update trigger
Table 15-8. RIP traceoptions Flags
www.ebook-converter.com
Flags allow you to set up some OSPF-specific information that you may want to see. Table 15-9 shows flags
that are available for OSPF traceoptions. Alternately, you can enter a partial command for a list of the
possible completions you can use as follows:
lab@chicago# set flag <enter> Will give you a list of the available flags.
Table 15-9. OSPF traceoptions Flags
Flags Description
database- Captures all database description packets used when synchronizing the OSPF
description topological database
lsa-ack Captures the link-state update acknowledgment packets used when synchronizing the
OSPF topological database
lsa-request Captures the link-state request packets sent from OSPF routers
lsa-update Shows all link-state update packets on the network
error Captures only OSPF error packets
Command Description
show ospf Provides information about LSA packets from the link-state database. Options include brief,
database detail, and extensive. You may also choose to show data about only a single named
OSPF instance or run the output through an LSA filter.
show ospf Displays the status of all interfaces that are running OSPF. Options include brief, detail,
interface and extensive. You may also view the interfaces connected to a particular OSPF instance
and may specify an interface or an interface name using a wildcard.
show ospf Provides information on the shortest-path calculations that have been logged. You can view
log this for one or all routing-instances. The output fields include when the calculation
occurred, what type of calculation was run, and how much time has elapsed since the
www.ebook-converter.com
calculation was last run.
show ospf Displays neighboring OSPF routers. Options include brief, detail, and extensive. You
neighbor may also view the neighbors per routing-instance or you may specify one neighbor in
particular that you wish to view.
show ospf Displays the OSPF routing table entries. Options include detail, abr, asbr, extern,
route instance instance-name, inter, or intra providing detailed output, routes to area
border routers or AS border routers, external routes, routes for a particular routing-
instance, inter-area routes, and intra-area routes, respectively.
show ospf Displays the protocol statistics for OSPF, such as packets in, packets out, and so on.
statistics
In this example, we are running a show ospf neighbor command on Chicago. We can see three
neighbors, the interface through which we know each neighbor, the state, and the neighbor's router ID. We
also see the value of the dead timer and that router's priority value. For more information on the meaning of
these OSPF values, please refer to Chapter 8.
www.ebook-converter.com
In addition to using the traceoptions command for monitoring IS-IS, you can also use the show isis
command. While this command can be used alone, you can also add six different qualifiers to gather even
more specific information. Table 15-12 lists these qualifiers.
Table 15-11. IS-IS traceoptions Flags
Flags Description
all Traces everything
csn Traces complete sequence number PDUs (CSNP)
error Shows errored packets
general Traces all general IS-IS events
hello Shows all hello packets transmitted
lsp Traces all LSP packets
lsp-generationTraces all LSP generation packets
normal Trace all normal IS-IS events
packets Captures all IS-IS-related packets
Downloader demo watermarks
policy
psn
Traces all policy processing
Traces all PSNPs
route Captures all IS-IS routing-update packets
spf Captures all SPF calculations performed
state Captures just state transitions
614
state Captures just state transitions 15. Troubleshooting Juniper Networks Routers
Flags
task Description
Captures routing-protocol task processing
timer Traces routing-protocol timer processing
Table 15-12. show isis Command Qualifiers
Qualifier Description
adjacency Use with system-ID or as brief or detail output to view all neighboring routers
database Use with system-ID or as brief, detail, or extensive output to show the entries in
the IS-IS link-state database
interface Use with either brief (default) or detail to show the status of all interfaces running IS-IS
routes Shows the summary of all IS-IS routes in the routing table
spf Shows information about SPF calculations that have run
statisticsShows statistics related to IS-IS, such as packets in, and so on
In this example, we use the show isis route command to view the IS-IS routing table. Notice that it
gives us the network prefix, the version of JUNOS running on the router, metrics for the route, and the
associated interface through which we connect to this network.
[edit protocols]
lab@Chicago# run show isis route
IS-IS routing table Current version: L1: 38 L2: 55
Prefix L Version Metric Type Interface Via
10.10.0.2/32 2 55 10 int at-1/2/0.235 Montreal
10.10.0.3/32 2 55 10 int at-1/2/1.167 SanJose
10.10.0.4/32 2 55 20 int at-1/2/0.235 Montreal
www.ebook-converter.com
10.10.0.160/30
10.10.0.164/30
2
2
55
55
at-1/2/1.167 SanJose
20 int at-1/2/0.235 Montreal
20 int at-1/2/1.167 SanJose
at-1/2/0.235 Montreal
10.10.0.192/30 2 55 20 int at-1/2/1.167 SanJose
10.10.0.224/30 2 55 30 int at-1/2/0.235 Montreal
at-1/2/1.167 SanJose
10.10.0.228/30 2 55 30 int at-1/2/0.235 Montreal
at-1/2/1.167 SanJose
10.10.2.132/30 2 55 20 int at-1/2/0.235 Montreal
17.185.36.224/30 2 55 20 int at-1/2/1.167 SanJose
192.168.18.4/30 2 55 20 int at-1/2/1.167 SanJose
Note that you can use the clear isis command and the same qualifiers to clear out some or all of the data
in the IS-IS databases and routing table. This comes in very handy when troubleshooting, especially when you
make a change and want to watch the counters and so on.
Flags Description
aspath Traces AS path regular expression operations
damping Traces route damping operations
keepaliveCaptures the BGP keepalive messages
open Shows the open packets sent between BGP peers when establishing a session
packets Captures all BGP packets of any type
update Shows all BGP update packets sent during routing updates on BGP ASs
In the following example, you can see that we are going to trace all BGP protocol traffic that is being
received. We are logging all traceoptions output to a file called bgp-trace.
www.ebook-converter.com
[edit protocols bgp]
lab@Chicago# set traceoptions file | bgp-trace
lab@Chicago# set traceoptions flag all receive
In addition to using the traceoptions command for monitoring BGP, you can use the show bgp
command. While this command can be used alone, you can also add four different qualifiers to gather even
more specific information. Table 15-14 lists these qualifiers.
Table 15-14. show bgp Command Qualifiers
Qualifiers Description
group Displays information about configured BGP groups
neighbor Displays information about all BGP peers; you can further specify a particular neighbor by
address
next- Displays the entries from the internal BGP synchronization database; you can further specify a
hop- next-hop router by address or specify that you would like to see the output in brief or detail
www.ebook-converter.com
Chapter 12 on MPLS has a lot of background and configuration information for this popular new style of
routing over Layer 2 virtual private networks (L2VPNs) using MPLS to carry the connection. Juniper
Networks routers support traceoptions functionality for advanced MPLS and VPN troubleshooting. As
with other protocols, you must first enable traceoptions globally before you set up the tracing of MPLS
tunnels. Once global traceoptions are enabled, you can enable certain traceoptions parameters for
MPLS as shown below:
lab@Chicago# edit protocols mpls
[edit protocols mpls]
lab@Chicago# set traceoptions file | filename <replace> <size size> <files
number> <no-stamp>
lab@Chicago# set flag flag <flag-modifier> <disable>
Again, by setting certain flags, you can selectively enable different elements to trace within the MPLS
protocol. Table 15-15 lists the flags that are available for traceoptions. To see a list of all possible flags
available from the CLI, hit enter after typing set flag to bring up a list of possible completions.
Flags Description
connection Captures all activity within CCCs.
connection-detailProvides a higher level of detail than the connection flag
617
15.theTroubleshooting
connection-detailProvides a higher level of detail than Juniper Networks Routers
connection flag
Flags Description
cspf Captures calculations performed for CSPF
cspf-link Captures all links visited during CSPF calculations
cspf-node Captures all nodes visited during CSPF calculations
error Traces only MPLS error packets
state Shows all LSP state transitions
You can also trace information about traffic on an L2VPN by using traceoptions. To do so, use the
following syntax:
lab@Chicago# edit routing-instances routing-instance-name protocols l2vpn
[edit routing-instances routing-instance-name protocols l2vpn]
lab@Chicago# set traceoptions file | filename <replace> <size size> <files
number> <no-stamp>
lab@Chicago# set traceoptions flag flag <flag-modifier> <disable>
Flags that you can use for tracing L2VPN information are shown in Table 15-16.
Table 15-16. L2VPN traceoptions Flags
Flags Description
All Captures everything
ConnectionsCaptures just events and state changes in the L2VPN
Error Displays only error packets
Nlri Captures L2VPN send/receive advertisements from BGP
Route Displays only the exchange of routing information
www.ebook-converter.com
Topology Captures information related to the change of topology due to reconfiguration or
advertisements
While traceoptions are important, the additional load they put on the router can sometimes be more than
you are willing to use to troubleshoot a problem. This is where show and clear commands come in handy.
They are simple tools that can be used to monitor counters, link information, and LSP information in an
MPLS or L2VPN environment. Some of the commands you can use when you want to keep it simple are
shown in Table 15-17. If you want to see a list quickly of all possible commands to use with show or clear,
you can press enter after typing in show l2vpn or clear l2vpn. The system will then display a list of
possible completions.
Table 15-17. MPLS and L2VPN show and clear Commands
Commands Descriptions
show/clear Shows (or alternately clears) the active, configured LSPs of which this router is a
mpls lsp participant; useful when troubleshooting basic communication problems
www.ebook-converter.com
10.10.0.1 10.10.0.2 Up 0 1 FF 3 - vpn-mont-denv
10.10.0.1 192.168.161.19 Up 0 1 FF 3 - uunet-sj-denv
Total 2 displayed, Up 2, Down 0
Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
The next example shows the show mpls interface command. With this command, we can get a quick
summary of all of our MPLS-enabled interfaces, along with their states and the administrative groups to
which they belong.
[edit]
lab@Chicago# run show mpls interface
Interface State Administrative groups
at-1/2/0.235 Up <none>
at-1/2/1.167 Up <none>
fe-1/0/1.0 Up <none>
Downloader demo watermarks
fe-1/0/0.0
ae1.0
Up
Up
<none>
<none>
DVMRP
This section addresses the commands used to turn on the traceoptions capabilities in DVMRP. With an
output filename of your choosing, enable traceoptions by using the commands shown below. Then, set
up specific output parameters with DVMRP-specific flags.
lab@Chicago# edit protocols dvmrp
[edit protocols dvmrp]
lab@Chicago# set traceoptions file | filename <replace> <size size> <files
number> <no-stamp>
lab@Chicago# set traceoptions flag flag <flag-modifier> <disable>
Flags allow you to gather output for some DVMRP-specific information that you may want to see. Table 15-
18 lists flags that are available for DVMRP traceoptions.
Table 15-18. DVMRP traceoptions Flags
Flags Descriptions
all Traces everything
www.ebook-converter.com
general Logs general DVMRP events
graft Logs DVMRP graft messages
neighborCaptures the neighbor probe messages
normal Traces normal events (The default is to capture abnormal or error events only.)
packets Captures all DVMRP-related packets
poison Shows only poison-route-reverse packets
policy Logs any policy processing activity in the router
probe Traces all probe packets versus the probe packets from neighbors only
prune Traces all prune messages
report Captures all DVMRP route report packets
route Traces all routing updates for DVMRP
state Displays any DVMRP state transitions
task Displays protocol task processing
timer Shows routing-protocol timer processing
Commands Descriptions
show dvmrp Shows any entries in the graft retransmission queue in either brief or detail mode
grafts (Normally, this queue should be empty.)
show dvmrp Displays some information about DVMRP-enabled neighbors
neighbors
show dvmrp Displays the table of known IP prefixes in this protocol instance
prefix
show dvmrp Shows all active and transmitted DVMRP prunes
prunes
show dvmrp Shows interfaces on which DVMRP is enabled
interfaces
show multicast Displays all multicast tunnels in use for either PIM or DVMRP
tunnels
show multicast Shows a list of the 10 most active DVMRP or PIM groups
usage
MSDP
As with DVMRP, you can enable tracing for MSDP as follows:
lab@Chicago# edit protocols msdp
www.ebook-converter.com
[edit protocols msdp]
lab@Chicago# set traceoptions file | filename <replace> <size size> <files
number> <no-stamp>
lab@Chicago# set traceoptions flag flag <flag-modifier> <disable>
In addition to enabling the tracing for MSDP globally, you can specify tracing for all peers in a group using
the [edit protocols msdp group group-name] hierarchy, or for an individual peer using the
[edit protocols msdp group group-name peer-address] hierarchy. Setting
traceoptions for a group will override anything you set for a peer within that group. You can also add
MSDP-specific flags that allow you to gather configurable output from the protocol. The flags used for MSDP
are listed in Table 15-20.
The following example shows how to trace all MSDP sa packets. This example logs all traceoptions
output to a file called msdp-trace.
[edit protocols msdp]
Flags
keepalive Descriptions
Traces just the MSDP keepalive packets between peers 621
15. Troubleshooting Juniper Networks Routers
keepalive Traces just the MSDP keepalive packets between peers
Flags
packets Descriptions
Traces all MSDP packets
route Traces only MSDP routing updates
sa Traces source-active packets
sa-request Traces source-active request packets only
sa-responseTraces responses to source-active requests
As you have seen with other protocols, show commands can be helpful in determining statistical information,
current status, and cache entries. Table 15-21 lists the commands that are useful in troubleshooting MSDP:
Table 15-21. MSDP Troubleshooting Commands
Commands Descriptions
clear msdp Clears entries from the MSDP source-active cache
cache
clear msdp Clears current MSDP statistics
statistics
show msdp Gathers general information about MSDP; options include brief and detail (You can also
execute this command for a single peer by specifying the qualifier peer followed by the peer
address. Additional options include source-active <group | originator |
source> to get specific information about entries in the sa queue.)
show msdp Provides information about all MSDP peers, or about a single peer, if you use the qualifier
statistics peer followed by the peer address
test msdp Allows you to find downstream MSDP peers; options include the dependent-peer prefix
to show downstream dependent MSDP peers or the rpf-peer originator to find the
RPF peer for the identified originator
www.ebook-converter.com
SAP/SDP
If your network is running videoteleconferencing and other multimedia conferences and presentations, you
may use SAP/SDP in your network. There are no traceoptions capabilities for SAP/SDP, but you can
take a look at the addresses to which the router is listening for multicast announcements by using the
following command:
User1@NewYork> show sap listen [brief | detail]
The output of this command will show you both the address and the port to which the router is listening.
IGMP
IGMP is one of the oldest multicast protocols. It uses join and leave messages to indicate members entering or
leaving the multicast group. In that respect, it is like a subscription-based service, sending information only to
Downloader demo watermarks
the members wishing to receive it. Tracing IGMP is similar to that in other protocols.
lab@Chicago# edit protocols igmp
[edit protocols igmp]
lab@Chicago# set traceoptions file | filename <replace> <size size> <files
622
15. Troubleshooting Juniper Networks Routers
number> <no-stamp>
lab@Chicago# set traceoptions flag flag <flag-modifier> <disable>
IGMP-specific flags for the traceoptions command are provided in Table 15-22. To see a complete list of
flags available, press enter after typing set flag, and you will see a list of possible completions for the
command.
Table 15-22. IGMP traceoptions Flags
Flags Descriptions
leave Traces IGMP group leave messages for IGMPv2 only
mtrace Captures only mtrace packets
packetsCaptures all IGMP packets
query Show all membership queries to any group type
report Captures group membership report messages
In the following example, you can see that we are going to trace all IGMP leave packets being sent. All
traceoptions output is logged to a file called igmp-trace.
[edit protocols igmp]
lab@Chicago# set traceoptions file | igmp-trace
lab@Chicago# set traceoptions flag leave send
Table 15-23 lists other helpful commands you can use to troubleshoot IGMP problems.
Table 15-23. IGMP Troubleshooting Commands
www.ebook-converter.com
Commands Description
show igmp group Displays information about all IGMP groups; you can get this output in brief or
detail mode and specify a particular group name if you like
show/clear igmp Allows you to show or clear information on one or all interfaces that are running
interface IGMP
show/clear igmp Allows you to view or clear statistics for one or all IGMP-enabled interfaces
statistics
PIM
PIM is a popular multicast routing protocol because it is not dependent on a particular unicast protocol, such
as IP. Whether you are running PIM-SM or PIM-DM, you can use the following commands to enable tracing:
lab@Chicago# edit protocols pim
[edit protocols pim]
Downloader demo watermarks
lab@Chicago# set traceoptions file | filename <replace> <size size> <files
number> <no-stamp>
lab@Chicago# set traceoptions flag flag <flag-modifier> <disable>
Flags that can be used when tracing PIM output are shown in Table 15-24, along with a brief description of
623
15. Troubleshooting Juniper Networks Routers
each.
Table 15-24. PIM traceoptions Flags
Flags Description
assert Captures assert messages used to discover which of the parallel routers is responsible for
forwarding packets on a network
bootstrapTraces Bootstrap packets sent out by the PIM (PIM-SM only) domain's designated Bootstrap
router
cache Captures packets in the PIM routing cache
graft Traces both graft and graft-acknowledgment packets
hello Captures all hello packets sent by the PIM routers to each other join Traces all join
messages sent to multicast groups
packets Traces all PIM packets on the network
prune Captures prune messages only
register Traces both register messages sent to the RP when a multicast source first starts
communicating with a group and register-stop messages
rp Captures candidate rp announcements
Here is an example of how to setup traceoptions for capturing all join packets received by a PIM-
enabled router. All traceoptions output is logged to a file called pim-trace.
[edit protocols pim]
lab@Chicago# set traceoptions file | pim-trace
lab@Chicago# set traceoptions flag join receive
www.ebook-converter.com
Table 15-25 lists additional commands that can be helpful in narrowing down a problem within PIM.
Table 15-25. PIM Troubleshooting Commands
Commands Descriptions
show pim Shows the status and detail of the Bootstrap router in a PIM-SM domain; no optional
bootstrap qualifiers
show/clear Displays or clears information about PIM groups; options include brief, detail, and
pim join extensive, and you can also specify a range of groups to display by prefix/prefix-
length
show pim Displays the status of interfaces on which PIM is configured; no optional qualifiers
interfaces
show pim Displays brief or detail information about the status of PIM neighboring routers
neighbors
show pim rps Displays the status of PIM RPs; options include brief, detail, or extensive output,
and output can be narrowed down to a single group-address
Downloader demo watermarks
show pim
source
Shows the status of the PIM RPF state; options include brief, detail, or extensive
output, and output can also be narrowed down to a single range by using source-prefix
show pim Displays (*,*.RP) RP join information; no optional parameters
wildcard
show/clear Allows you to display or clear the statistics for all interfaces running PIM; a single interface
624
show/clear Allows you to display or clear the statistics15.
for Troubleshooting Juniper
all interfaces running PIM;Networks Routers
a single interface
Commands
pim Descriptions
can be specified by using interface interface-name
statistics
show Shows you a list of the 10 most active DVMRP or PIM groups
multicast
usage
show Displays all multicast tunnels in use for either PIM or DVMRP
multicast
tunnels
www.ebook-converter.com
show chassis environment
show interfaces extensive
show configuration
The show interfaces extensive command will be executed for every configured interface. The
show configuration command will not include sensitive data, such as passwords. By having this
information readily available when logging a case, you may either paste it into the support request (if logging
it via the Web) or e-mail it to the engineers (if logging the request via telephone), if they require the data.
Chapter Summary
This chapter covered material related to the simple and more advanced troubleshooting of Juniper Networks
routers. Specifically, it introduced you to overall network troubleshooting and the Juniper Networks–
prescribed model of troubleshooting, recommended for all of their customers.
Downloader demo watermarks
You have learned how to gather information by visually inspecting the router and its components, such as the
power supplies and control boards. You found that you can do this either locally or remotely through the CLI.
In this way, you can tell how the router is functioning from a chassis and interface perspective. The system
LEDs and craft interface give you much of the information you need to make a rapid assessment.
625
15. Troubleshooting Juniper Networks Routers
Besides the chassis information, you can use static monitoring for snapshots of a moment in the life of your
Juniper Networks router. This information can provide important baseline information or clues to a problem
that is developing.
Real-time information can be gleaned from traps sent to your NMS or from traceoptions commands. The
traceoptions command set, as you have discovered, is a powerful debugging tool that, when used
judiciously, can help you find the root of a complex problem. Enabling traceoptions from the [edit
routing-options] hierarchy gives you a global perspective on the network. The chapter then showed
you how to enable tracing flags to get more specific information per protocol.
By running traceoptions on different routing protocols, you can gain valuable insight into peering
operations, exchange of periodic information, routing up dates, and so on. You will find this helpful in both
preparing for the JNCIS exam and daily troubleshooting of simple and advanced network problems.
Remember to use the JTAC when advanced problems frustrate normal troubleshooting, or refer to the Juniper
Networks Web site or router technical manuals for further assistance.
Bibliography
www.ebook-converter.com
www.ebook-converter.com
www.ebook-converter.com
BGP Border Gateway Protocol
BGP4 Border Gateway Protocol version 4
BSR Bootstrap router
CBGP confederation BGP
CBR constant bit rate
CBT core-based tree
CCC circuit cross connect
CCSI Cisco Certified System Instructor
CE customer edge
Chk checksum
CIDR classless interdomain routing
CIP connector interface panel
CLI command-line interface
Downloader demo watermarks
CLNP
CLP
Connectionless Network Protocol
cell loss priority
CMTS Cable Modem Termination System
Co control
628
Co control Acronyms
CoS class of service
cps cell per second
CPU central processing unit
CRC cyclical redundancy check
CRU central routing unit
CSNP complete SNP
CSPF Constrained Shortest Path First
DA destination IP address
DBM distributed buffer manager
DHCP Dynamic Host Configuration Protocol
DIET designing, implementing, executing, and testing
DiffServ Differentiated Services
DLCI data link connection identifier
DNS domain name server
DO data offset
DoS denial of service
DP destination port
DR Designated Router
DS Differentiated Services; digital stream
www.ebook-converter.com
DS-0 digital stream-0
DSCP differential service code point
DSP domain specific Part
EBGP External Border Gateway Protocol
ECMP equal cost multipath
EGP Exterior Gateway Protocol
ERO explicit route object
FCS frame check sequence
FEB forwarding engine board
FEM forwarding engine module
FPC flexible PIC concentrator
FSM finite state machine
FTP File Transfer Protocol
Downloader demo watermarks
GFC
GGSN
generic flow control
gateway GPRS support node
GigE gigabit Ethernet
GRE generic route encapsulation
629
Acronyms
HC header checksum
HP-NNM Hewlett-Packard's Network Node Manager
HTTP Hyper Text Transfer Protocol
IBGP Internal BGP
ICMP Internet Control Message Protocol
ID identification
IETF Internet Engineering Task Force
IGMP Internet Group Management Protocol
IGP Interior Gateway Protocol
IHL IP header length
ILMI integrated local management interface
IntServ Integrated Services
IP Internet Protocol
IP/ATM Internet Protocol over Asynchronous Transfer Mode
IPv4 Internet Protocol version 4
IPv6 Internet Protocol version 6
IR internal router
IRR Internet routing registry
IS-IS Intermediate System-to-Intermediate System
www.ebook-converter.com
ISO International Standards Organization
ISP Internet service provider
J-cell 64-byte block
JNAI Juniper Networks Authorized Instructor
JNCIE Juniper Networks Certified Internet Expert
JNCIS Juniper Networks Certified Internet Specialist
JNNTC Juniper Networks Technical Certification Program
JTAC Juniper Technical Assistance Center
JUNOS Juniper Network Operating System
L1/2 level 1/2
L2VPN Layer 2 virtual private network
LAN local area network
LDP Label Distribution Protocol
Downloader demo watermarks
Len
LH
length
long haul
LMI local management interface
LSA link-state advertisement
630
LSA link-state advertisement Acronyms
LSDB link state database
LSP label switched path; link state PDU
LSR label switching router
M management bit
MAN metropolitan area network
MBGP Multicast BGP
mbone multicast backbone
MCS miscellaneous control Subsystem
MD5 message digest
MED MULTI_EXIT_DISC
MIB management information base
MOSPF Multicast Open Shortest Path First
MPLS multiprotocol label switching
MSDP Multicast Routing Protocol Protocol
MTBF mean time between failure
MTU maximum transmission unit
NBMA nonbroadcast multiaccess
NET network entity title
NIC network information center; network interface card
www.ebook-converter.com
NLPID
NLRI
Network Layer Protocol ID
network layer reachability information
NLSP NetWare Link State Routing Protocol
NMS network management station or system
NNI network node interface
NSAP network service access point
NSSA not-so-stubby area
NTP Network Time Protocol
OC optical carrier
OID object identifier
Opt option
OSI open systems interconnection
Downloader demo watermarks
OSPF
P
Open Shortest Path First
protocol; provider
PCG PFE clock generator
PCR
PDU peak celldata
protocol rate unit
631
PDU protocol data unit Acronyms
PE provider edge
PFE packet forwarding engine
PFM packet forwarding module
PHP penultimate hop Popping
PIC physical interface card
PIM-DM Protocol Independent Multicast—Dense Mode
PIM-SM Protocol Independent Multicast-Sparse Mode
POS Packet over SONET
PPP Point-to-Point Protocol
PSNP partial SNP
PT payload type
p-t-p point-to-point
PVC permanent virtual circuit
QoS quality of service
RADB route arbiter database
RD route distinguisher
RE routing engine
RED random early detection
Res reserved
www.ebook-converter.com
RFC
RIB
request for comment
routing information base
RID router identification
RIP Routing Information Protocol
RMA return merchandise authorization
RP rendezvous point
RPM reverse path multicasting
RPSL routing policy specification language
RSVP Resource Reservation Protocol
RSVP-TE RSVP with traffic engineering extensions
RTM routing table manager
SA source active; source IP address
Downloader demo watermarks
SAP
SAP/SDP
Session Announcement Protocol
Session Announcement Protocol/Session Description Protocol
SAR segmentation and reassembly
SCP Secure Copy Protocol
SCR sustained cell rate 632
Acronyms
SCR sustained cell rate
SDH Synchronous Digital Hierarchy
SDP Session Description Protocol
SE system engineer
SFD start of frame delimiter
SFM switching and forwarding module
SGMP Standard Gateway Monitoring Protocol
SLIP Serial Line Internet Protocol
SN sequence number
SNA systems network architecture
SNMP Simple Network Management Protocol
SNP sequence number packet
SONET Synchronous Optical Network
SP source port
SPE synchronous payload envelope
SPF shortest path first
SSB system and switch Board
SSH secure shell
STM synchronous transport module
www.ebook-converter.com
STS
SVC
synchronous transport signal
switched virtual circuit
TACACS+Terminal Access Controller Access Control System +
TCP Transmission Control Protocol
TCP/IP Transmission Control Protocol over Internet Protocol
TDM time division multiplexing
TED traffic-engineering database
TL total Length
TNP Trivial Network Protocol
ToS type of service
TTL time to live
UBR unspecified bit rate
Downloader demo watermarks
UDP
UHP
User Datagram Protocol
ultimate hop popping
UID user identifier
UNI
UP user-network
urgent pointerinterface
633
UP urgent pointer Acronyms
UTP unshielded twisted pair
v version
VBR variable bit rate
VCI virtual channel identifier
VLSM variable length subnet masks or masking
VPI virtual path identifier
VPN virtual private network
VRF virtual routing and forwarding
VRRP Virtual Router Redundancy Protocol
VSA vendor specific attribute
VT virtual tributarie
WAN wide-area network
WRED Weighted RED
XML extensible markup language
XNS Xerox Network Systems
www.ebook-converter.com
www.ebook-converter.com
James worked as a technical analyst for Automated Data Processing, and as an
instructor's assistant for the Cisco Networking Academy courses at Kennesaw State
University. Prior to that he spent several years touring the East Coast with the now
defunct punk-rock band Hey, Zeus and the Tall Boys.
www.ebook-converter.com
It tracks your historical scores to see how your learning has progressed. You can
even have the software ask you only the questions you have gotten wrong.
It randomizes the order of the questions and answers so you cannot memorize them
very easily. This is an excellent option, and we highly recommend using it.
It provides the ability to turn questions into flash cards, allowing you to use the
questions as a learning aid.
Its simulator mode allows you to take a timed practice quiz with the characteristics of
the actual exam.
638
A. Practice JNCIS Questions
3. IS-IS cannot be used over ATM circuits
4. IS-IS uses mesh groups to limit excessive packets
www.ebook-converter.com
65534
4.
A3: C. 63
The maximum metric value allowed for IS-IS routes is 63 unless wide metrics are
specified to be used exclusively via the wide-metrics-only command.
4: Assuming that all inet.3 routes have not been merged into inet.0, which
command, used under the [edit protocols mpls label-switch path
NAME] hierarchy will result in a route that can be pinged?
1. Install 10.0.0.0/8
2. Install 10.0.0.0/8 active
Downloader demo
Install 10.0.0.0/8 rib
3. inet.0 watermarks
4. Install 10.0.0.0/8 enable ping
The install command causes a route, in addition to the standard host route to
the egress of the LSP, to be installed into the inet.3 routing table. Routes in
inet.3 are not installed into the forwarding table; therefore, it is not possible to
ping these routes from another router, and they are only available for use by BGP
as next-hops. By using the active keyword, you specify that a particular route
should be installed into inet.0, which will result in a route that can be used for
BGP next-hops and can also be pinged by other routers.
5: When configuring setup and hold priority for an LSP, what is true?
1. Setup and hold priority are independent and can be configured as you like.
2. Setup priority must be higher than hold priority.
3. Hold priority must be higher than or equal to setup priority.
4. They must be the same.
www.ebook-converter.com
1. A router will never advertise a no_export route to any of its neighbors.
A router will never allow a no_export route to be exported into an IGP.
2.
3. A router will never allow a no_export route to leave the sub_as within a
confederation.
4. A router will never allow a no_export route to leave the AS (or
confederation, if confederations are used).
A8: D. A router will never allow a no_export route to leave the AS (or
confederation, if confederations are used).
There are a number of well-defined communities that can be used to indicate with
Downloader demo watermarks
whom a route should be distributed. The no_export community indicates that a
route should not leave the confederation (or AS if confederations aren't used).
9: MSDP is used to link the domains of which protocol?
641
A. Practice JNCIS Questions
1. MOSPF
2. IS-IS
3. DVMRP
PIM
4.
A9: D. PIM
MSDP is used to interconnect PIM routing domains. Two MSDP routers establish
adjacencies similar to EBGP. Multicast source information is then transferred back
and forth between the two PIM domains.
10: What is true about the BGP path attribute Local Preference?
1. The lower the number, the more preferred the route.
2. It can be used to affect the routing of peer-ASs.
3. It can only be used to affect your local-AS.
4. It can only be used to affect the routing of the local router.
www.ebook-converter.com
A10: C. It can only be used to affect your local-AS.
Local Preference is a BGP attribute that is shared within an AS. The higher
the local preference, the more preferred the route is. It does not leave the AS, but it
is shared between all members of the AS.
11: While monitoring an RSVP session, you notice that one of your routers is
periodically sending a PATH message. What is the likely cause of this?
1. Your link is flapping.
2. Your bandwidth allocation is changing too frequently.
3. This is standard RSVP behavior.
Downloader demo watermarks
Your LSP never initialized correctly.
4.
642
A. Practice JNCIS Questions
In a correctly functioning network, RSVP will send PATH messages every 30
seconds (the default refresh time) to maintain the state of the LSP. Without these
periodic PATH messages, the LSP would age out and be removed by all the routers
in the path.
12: What command must be used to cause an ABR of a stub area to inject a default
LSA type 3 route into an area?
1. No command is necessary; this is done by default
2. Stub default-metric
3. Stub generate-default
4. Stub summary
Juniper Networks stub ABRs do not automatically inject a default LSA type 3 into
the area. To generate this LSA you must use the default-metric command
and specify a metric to be used for the LSA.
13: If you have a route to the same destination from the following four sources, which
will be picked?
www.ebook-converter.com
OSPF External route
1.
A13: D. RIP
Of the IGPs, RIP has the worst preference value (100); however, external routes
from OSPF and IS-IS level 1 have worse preference than RIP does (150 and 160
Downloader demo watermarks
respectively). BGP has the worst of all: 170. The lower the preference, the more
preferred the protocol.
14: What is the default encapsulation on a SONET link?
1. PPP
643
A. Practice JNCIS Questions
2. Cisco-HDLC
3. Frame-Relay
4. Juniper-HDLC
A14: A. PPP
The default encapsulation on a SONET link is PPP. There is no Juniper-HDLC.
15: Two Juniper Networks routers are advertising their presence via IRDP (ICMP
router discovery protocol). Router A is using the default preference and router B is
using a preference of 50. Which router will become the default router for the
network?
1. Router A
2. Router B
3. Neither
4. They will load balance
www.ebook-converter.com
A15: B. Router B
The default preference value for IRDP is 0 and the default router is determined by
which router has the greatest preference. In this case router A has a preference of 0
(the default preference) and router B has a preference of 50, so router B will
become the default router.
16: You have an AS-Path of 65425 65126 4285 196. In your external peering
session, you have remove-private configured. Which AS-Path will be
advertised to the external peer?
1. 65425 65126 4285 196
Downloader
2.
4285 196
3.
demo watermarks
65126 4285 196
4. 65425 65126
644
A. Practice JNCIS Questions
A16: C. 4285 196
The remove-private command will strip the private ASNs off of the AS-Path
before transmitting the path information to the external neighbor.
17: What is the default half-life value for route dampening?
1. 10
2. 15
3. 20
4. 40
5. 50
A17: B. 15
Route dampening is used to limit the disturbance caused by flapping routes. Every
time a route flaps, it will be penalized by having its figure of metric added to. Once
its figure of metric reaches a certain level, the route will be suppressed. The route
www.ebook-converter.com
will not be eligible for use until the figure of metric has been lowered below the
reuse level. After every half-life elapses, the figure of metric will be cut in half. The
default is 15 minutes.
18: What is the result of the following configuration statement: set system ntp
boot-server 192.168.20.1
1. Tells the system to advertise the address 192.168.20.1 as a boot server
2. Tells the system to synchronize its time with the NTP time server at address
192.168.20.1 when the router boots
3. Tells the system to only allow host 192.168.20.1 to connect to the boot
server
Downloader
Provides NTP relay processesdemo
4.
192.168.20.1
and directs all NTPwatermarks
messages to
A18: B. Tells the system to synchronize its time with the time server at address
645
A18: B. Tells the system to synchronize its time with the time A.
server at JNCIS
Practice address
Questions
192.168.20.1 when the router boots
It sets a designated server to provide a time to the router when it boots. At boot,
the router issues an ntpdate request, which polls the network server to determine
19: the localNetworks
Juniper date and routers
time. consist of two main units. They are
www.ebook-converter.com
Juniper Networks routers consist of two main units that are interconnected. These
units are the PFE, which forwards traffic through the interfaces and does route
lookups, and the routing engine, which handles router management and protocol
management and contains the storage devices (Flash drive and hard drive).
20: The inet.3 routing table is used for
A21: D. 192.168.231.0/24
The exact statement requires that the prefix length be exactly 24 bits; therefore
the /16 and /30 routes would not fit this description. Even though
192.168.231.20 is a Class C network address, there is no prefix length
associated with it, so a default prefix of /32 is assumed. Therefore the /32 does
not match the filter rules.
22: Which of the following matches the AS regular expression (1485 193+ 425?
www.ebook-converter.com
1226*.)?
1. 1485 193 193 482
2. 1485 193 425 1226 485
3. 193 1226
4. 1485 425 1356
Downloader
1485 must be present. 193+ means demo watermarks
1 or more repetition of 193, so at least 1
instance of 193 must be present. 425? means 0 or 1 repetitions of 425, so it can be
present or missing. 1226* means 0 or more repetitions of 1226, so it can be
present or missing. The . signifies that there must be a term following the previous
647
A. Practice JNCIS Questions
terms, but it doesn't matter what it is.
23: Where would you specify SDH framing for a SONET interface?
1. At the [interface so-x/y/z sonet-options] level
2. At the [interface so-x/y/z] level
3. At the [chassis fpc (slot-number) pic (pic-number)] level
4. At the [chassis fpc (slot-number)] level
1. RSVPv1
2. RSVPv2
www.ebook-converter.com
RSVPv1 and v2
3.
A24: A. RSVPv1
JUNOS currently supports RSVPv1 only (up through v4.4). Future implementations
may change the level of RSVP support.
25: In what mode must PIM be running for auto-rp to function (assuming you have
not configured a static RP)?
1. Sparse mode
Downloader
Dense mode
2. demo watermarks
3. Sparse-dense mode
648
A. Practice JNCIS Questions
4.Multicast mode
A25: C. Sparse-dense mode
In order for auto-rp to function, the router must be operating in sparse-dense
mode. This allows the control traffic to reach the router via the dense groups
224.0.1.39 and 224.0.1.40, while allowing the rest of the groups to remain
in static mode as long as they have an RP dynamically configured for them.
Another option would be to leave the router in sparse mode and statically configure
an RP for the 224.0.1.39 and 224.0.1.40 multicast groups.
26: Router A receives an MPLS encapsulated packet with a label of 100020, which is
not included in the routing table. What does router A do with the packet?
1. Checks second to top label; if recognized, forwards accordingly
2. Drops the packet
3. Removes label stack and forwards according to the network address
4. Creates a new label and forwards to all routers
www.ebook-converter.com
When an LSR does not recognize the top label of a label stack, it will drop the
packet.
27: If a firewall filter is defined on an interface and a packet does not match any of the
terms, what action is taken?
1. The packet is accepted.
2. The packet is discarded.
3. The packet is rejected.
4. The packet is stored.
A28: B. inet.3
The traffic-engineering bgp command causes routes to MPLS LSPs to be
installed in the inet.3 routing table only. When selecting next-hop, BGP always
gives preference to routes in inet.3 when they are equal to routes in inet.0.
29: MPLS provides what type of functioning to a router?
www.ebook-converter.com
Multiple Protocol Layered System
2.
1. M5
650
A. Practice JNCIS Questions
2. M10
3. M20
4. M40
5. M160
A30: C. M20
E. M160
Only the M20 and M160 support redundant routing engines.
www.ebook-converter.com