You are on page 1of 98

Junos® Networking Technologies

DAY ONE: ADVANCED OSPF IN THE ENTERPRISE

Get ready for future growth and expansion by utilizing OSPF in your enterprise network. This book shows you how with rock-solid Junos OS techniques.

By Timothy Beaumont

DAY ONE: ADVANCED OSPF IN THE ENTERPRISE
As your network grows, as your business takes on new employees, as more and more services are shared within your network environment, and as all the other forces at work in today’s networking environment come into play, OSPF’s ability to scale is key to the success of your enterprise environment. As one of the most widely used routing protocols, OSPF has many advantages over other IGPs (Interior Gateway Protocols), with its ability to scale in a manageable way being one of the most important. OSPF also has the advantage of converging much faster than other enterprise level IGPs, such as EIGRP or RIP. This book shows you how to avoid common pitfalls when applying OSPF in Junos devices in an enterprise environment and how to prepare your network for future growth and expansion.

“Day One: Advanced OSPF in the Enterprise provides an easy to understand deep dive into the implementation and configuration of OSPF in an enterprise environment. It is an excellent resource for reference material.” Chris Jones, Senior Consultant, Accuvant Inc.

IT’S DAY ONE AND YOU HAVE A JOB TO DO, SO LEARN HOW TO:
Configure and verify the use of areas within a Junos network. Use, configure, and verify the use of various types of stub areas within a Junos network. Connect Multiple Homogeneous OSPF domains within a network and verify that the network is operational. Connect Multiple Autonomous systems within an enterprise network using OSPF and BGP and verify its operational status. Configure and verify OSPF route redistribution within an enterprise network. Use and configure OSPF virtual links within the network.

Juniper Networks Books are singularly focused on network productivity and efficiency. Peruse the complete library at www.juniper.net/books. Published by Juniper Networks Books
ISBN 978-1936779444

51600

9 781936 779444

07100148

Junos Networking Technologies
®

Day One: Advanced OSPF in the Enterprise
By Timothy Beaumont

Chapter 1 : OSPF in a Nutshell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Chapter 2 : Single Domain Intra Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Chapter 3 : Stubbiness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Chapter 4: Redistribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Chapter 5: Multiple Homogeneous Domains . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Chapter 6: Multiple Autonomous Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Chapter 7 : Virtual Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

5.473. Juniper Networks.192.909.S. 6. 6. Send your suggestions.599. for all the time she devoted to this project. 6. and ScreenOS are registered trademarks of Juniper Networks.459. Published by Juniper Networks Books Authors: Timothy Beaumont Technical Reviewers: Jamie Panagos. in the United States and other countries.479.538.359. the Juniper Networks logo. Juniper Networks reserves the right to change. or registered service marks are the property of their respective owners.347.785. Juniper Networks assumes no responsibility for any inaccuracies in this document. 6. Junos. All other trademarks. He has been with Juniper for over six years working with large enterprise customers. comments.440.493. Junose is a trademark of Juniper Networks.899. Inc.312. transfer. Products made or sold by Juniper Networks or components thereof might be covered by one or more of the following patents that are owned by or licensed to Juniper Networks: U. juniper.333. or otherwise revise this publication without notice.902. 6.051.538. ISBN: 978-1-936779-44-4 (print) Printed in the USA by Vervante Corporation. .579.706. ISBN: 978-1-936779-45-1 (ebook) Version History: v1 January 2012 2 3 4 5 6 7 8 9 10 #7100148-en This book is available in a variety of formats at: www. And to Nancy Koerbel. 6. my editor. NetScreen.918. Author’s Acknowledgments I would like to thank my family for giving me the time to write this book.406. 6.567.650.net.186. 6.net/dayone.518. registered trademarks. Inc.725.578. All rights reserved. service marks. 6.590. ii © 2012 by Juniper Networks. and critiques by email to dayone@juniper. Inc. Patent Nos.905. 6. Trey Campbell Editor in Chief: Patrick Ames Editor and Proofer: Nancy Koerbel J-Net Community Manager: Julie Wider About the Author Timothy Beaumont is a Senior Consulting Engineer with Juniper Networks.552. modify. 6. 5. and 6. 6.429. Brandon Bennet. 5.

or Mac) by opening your device's Kindle app and going to the Kindle Store. You can now drag and drop the file out of iTunes onto your desktop and sync with your .net/dayone.epub files.amazon. You can obtain either series. Search for Juniper Networks Books. The series covers Junos OS and Juniper Networks networking essentials with straightforward explanations. Day One books were conceived to help you get just the information that you need on day one. whose concepts and test bed examples are more similar to a weeklong seminar.epub file from the iTunes Store.com) for between $12-$28. iPad. „ Note that Nook. depending on page length. PC. produced and published by Juniper Networks Books.epub device. . in multiple formats: „ Download a free PDF edition at http://www. vervante.com) or Amazon (www. Search for Juniper Networks Books.juniper. Kindle. „ Get the ebook edition for any device that runs the Kindle app (Android. step-by-step instructions. but isn't an Apple product. „ Purchase the paper edition at either Vervante Corporation (www. iii Welcome to Day One This book is part of a growing library of Day One books. open iTunes and download the . The Day One library also includes a slightly larger and longer suite of This Week books. „ Get the ebook edition for iPhones and iPads from the iTunes Store. and practical examples that are easy to follow. „ If your device or ebook app uses . iPad. and various Android apps can also view PDF files.

„ Use and configure OSPF virtual links within the network.. If you do not meet the following assumptions. you should also have basic knowledge of how OSPF discovers neighbors. iv What You Need to Know Before Reading This Book Before reading this book. may be difficult to comprehend: „ You should have experience with the configuration and operation of medium to large enterprise networks. After Reading This Book. „ Configure and verify OSPF route redistribution within an enterprise network. understand.. „ Configure and verify the use of areas within a Junos network. and the different LSAs used. . and change the Junos configuration. the different states of neighbor discovery. and verify the use of various types of stub areas within a Junos network. portions of this book and its tutorials. You’ll Be Able To. configure. you should be familiar with the basic administrative functions of the Junos operating system. „ Use. This book makes a few assumptions about your network knowledge and understanding of the OSPF protocol and working with it in Junos. „ Connect Multiple Homogeneous OSPF domains within a network and verify that the network is operational. „ You should have an understanding of IPv4 addressing and how to summarize IPv4 networks. „ Connect Multiple Autonomous systems within an enterprise network using OSPF and BGP and verify its operational status. including the ability to work with operational commands and to read. „ And finally. „ You should also have a basic understanding of how to configure OSPF using Junos within a network.

. . . . . . . . . . . . . . . . . . 8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 LSAs and LSAs Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Adjacency . . . . . . . . .Chapter 1 OSPF in a Nutshell Areas and Area Types . . . . . . . . . . .

Each router keeps track of its own link-states and notifies all other connected routers if any change is made. as your business takes on new employees. which are discussed in further detail in the next section. such as EIGRP or RIP. the quick review in this chapter should help you grasp a Junos-centric view of OSPF. Even though OSPF is widely used and well documented.with its ability to scale in a manageable way being one of the most important. Let’s begin with the basics. save you time and eliminate uncertainty. in the long run. This book addresses pitfalls that arise when applying OSPF in Junos devices in an enterprise environment. OSPF has many advantages over other IGPs (Interior Gateway Protocols). from a link perspective. OSPF also has the advantage of converging much faster than other enterprise level IGPs. Each router also has a database of connections or links from every other router in the network. however. and it also makes the shortest path first (SPF) calculations inefficient when the router builds the routing table. In large networks. these databases can become unmanageable if every router has information about the database of every other router. OSPF’s ability to scale is key to the success of your enterprise environment. As your network grows. OSPF networks can be grouped into logical network areas. suboptimal summarization. and large changes in network topology. Subsequent chapters reference these elements extensively and a quick sync with OSPF basics should. If you’re coming from IOS or the operating system of another networking vendor. going unchecked. The pitfalls that occur are usually centered around the improper use of areas. As one of the most widely used routing protocols. . OSPF is a link-state routing protocol based on the router’s full knowledge of the entire network. which means the router must have a complete understanding of the network topology within the area. such as Cisco IOS. Before you roll up your sleeves and get to work. To alleviate this problem. as more and more services are shared within your network environment. 6 Day One: Advanced OSPF in the Enterprise The OSPF (Open Shortest Path First) algorithm is a link-state routing mechanism designed for medium to large enterprise networks. operating it can be riddled with shortcomings if it’s been implemented improperly. such as additions of new networks within the enterprise network. and as all the other forces at work in today’s networking environment come into play. you might want to read the overview of the basic elements of OSPF in an enterprise environment provided in this chapter.

The defaults are listed in Table 1. but must agree with both sides of the adjaceny. There are three types of OSPF areas: 1. Stub Area: An area that is not Area 0. The link-state databases of separate OSPF areas will differ from each other. The hello packets are sent at predetermined intervals. If the hellos are not seen for a period of time. Adjacency OSPF. OSPF has a rule requiring all areas to connect to a single contiguous backbone Area 0. OSPF Backbone Area 0: The one constant of OSPF is there must always be a backbone Area 0. The intervals are configurable.1 Network type Broadcast NBMA Point-to-point Point-to-multipoint Default Intervals for Adjacencies Hello frequency Dead timer 10 sec 30 sec 10 sec 30 sec 40 sec 120 sec 40 sec 120 sec . Adjacency is a bidirectional communication that is kept alive by OSPF hello packets. The default intervals vary depending on the type of network the hello packets are communicating on. Chapter 1: OSPF in a Nutshell 7 Areas and Area Types OSPF areas are independent entities. Therefore the OSPF Area 0 will always exist in every OSPF network with more than one area. as stated before. 3. it first must have an adjacency. and therefore. a smaller routing table. OSPF Regular area: An area that is not Area 0. 2. the peering relationship will be removed. In order for OSPF to send this information. and is not flooded with AS-external LSAs making a smaller OSPF LSA database. and all routers within an area must have identical link-state databases. All routers within this area are aware of each other’s link-state database. but is attached to Area 0. is a link-state protocol that sends information about its links to other routers in the network.1 below: Table 1.

or a link-state request packet (LSR). The set of routers attached to the network. . designates a sent hello Hello packet was received Bi-directional communication with neighbor Starting the ability to exchange database information Sharing of databases Exchanging of the LSAs Complete adjacency LSAs and LSAs Types After OSPF has full adjacency with its neighbors.2 Adjacency States Description Neighbor state Down Attempt Init 2-way Exstart Exchange Loading Full Beginning state.3. routers exchange their knowledge of the network as each one sees it. 8 Day One: Advanced OSPF in the Enterprise An adjacency can be in one of a number of different states listed in Table 1. no peering NMBA only. originated by the DR(explained later). This synchronizes the LSAs database. Table 1. This process begins when a router receives a link-state update packet (LSU). and the neighbors also flood these LSAs to their other neighbors until the entire area is flooded. allowing the routing table to be populated. Table 1.3 LSAs Type Type-1 Type-2 LSAs Types and Descriptions Name Description Router-LSA Network-LSA States of the routers interfaces and information on them. The router begins flooding link-state advertisements (LSAs) to its neighbors. The LSAs types and descriptions are listed in Table 1.2 during its life cycle.

not used by Juniper routers. and their functions within the network. Backbone Router (BR) – A router that is connected to the backbone Area 0. Area Border Router (ABR) – A router that connects one or more areas to the backbone Area 0. originated by the AS boundary routers. Routes from outside the OSPF routing domain. 4. These are originated by the ABR’s at the area’s border. Used for IPV6 prefixes. Used by multicast. . 3. originated by the ABR’s at the area borders. for example. An ABR can also be an ASBR. it’s useful to note that an individual router can have multiple router classifications. They determine what types of LSAs the router generates. It creates external LSAs for these external routes for OSPF. The classification of a router type within OSPF is important when describing connectivity and LSA generation. or MOSPF. Autonomous System Boundary Router (ASBR) – This router connects to more than one routing protocol. It is used to distribute routes received from other external ASs throughout its own AS. Describes the inter-area routes to the AS boundary routers. Type-4 ASBR-summary-LSA Type-5 Type-6 Type-7 Type-8 AS-external-LSA Group membership NSSA-LSA Link-LSA OSPF Router Types Router types are an attribute of the OSPF process. The OSPF router types are listed below and are also used in coming chapters. They validate reachability to an ASBR. 1. External routes information inside a NSSA area. 2. Chapter 1: OSPF in a Nutshell 9 Type-3 Network-summary-LSA The inter-area routes from other areas. With this in mind. one for each area it is in. The ABR maintains multiple copies of the link-state database. It is considered a member of all areas it’s connected to. Internal Router (IR) – A router that only connects to a single area. An ABR is always a BR.

. the next chapter begins with a basic topology and complexity is added throughout the remaining chapters. look for the MORE? paragraphs throughout this book. If you want or need more OSPF-centric details. Let’s get started with a Single Domain Intra Area. a testbed. or Junosphere. If you’re following along in your lab. 10 Day One: Advanced OSPF in the Enterprise Summary That’s it for a general review of the basic elements of OSPF in an enterprise environment.

. . . . . . . . . . . . . . . . . .13 Use and Configuration of Summarization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 2 Single Domain Intra Area Configuration of Backbone Area 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Summary . . . . . . . . . . . . . . . . . . . . . . . . . 26 . . .

and Harry Reynolds. MORE? ABR LSA types can vary depending on what they are connected to and the type of area they are communicating with. see the book Juniper Enterprise Routing. and Area 2 as shown in Figure 2.1. and the router types are ABR routers for Area 0.net/books. Doug Marshcke. The areas used will be Area 0. juniper. and type-3.lmi. The LSA types that the two Area 0 devices are sending are type-1.html.net/canepa/subdir/ospf_fundamentals. R4 Area 2 R3 Area 1 Area 0 R1 Figure 2.1. R1 and R2 are in Area 0 and are using Ethernet interfaces. and type-3 are discussed in this chapter.1 OSPF Topology for Chapter 2 R2 As you can see in Figure 2. at http://www. Area 1. type-2. For more information on LSA types see http://users. For more information on the LSA types that OSPF can use. The interface IP list and connection types used in the topology of this . but only type-1. type-2. by Peter Southwick. 12 Day One: Advanced OSPF in the Enterprise This chapter details the fundamentals of a basic enterprise deployment of an OSPF network using a multi-area network within a single instance of OSPF. 2nd Edition. There are many LSA types.

0 lo0.168.2/30 Configuration of Backbone Area 0 The backbone area (also known as Area 0 or Area 0.2/30 192.0.1. Chapter 2: Single Domain Intra Area 13 chapter are listed in Table 2. Router IDs also enable SSH-ing to routers by using the router ID found in the database list as an easy guide to where routes originate.2/32 10.0.0 192.4/32 ge-0/0/0.R3 R2 .1.0 lo0. The backbone area is responsible for distributing routing information between non-backbone areas.0 ge-0/0/0. a scenario covered later in this book. if Area 0 were to go down.1/0 192.2/30 192.1.1.” This situation leads some engineers to create multiple instances of OSPF to limit the failure domains of networks. Therefore. It is the logical and physical structure for the OSPF domain and is attached to all non-zero areas in the OSPF domain.3/32 10.168.1.168.3.3. Another advantage to manually defining the router ID is that it .0 lo0.2. A common best practice is manually setting the router ID for the OSPF process on each router.168. This helps traffic to navigate through large networks and to find certain routers within an advertising or peering relationship. Table 2.0 lo0.1.1.R2 R1 . All other areas are connected to it.1.0 ge-0/0/1.1.1 Link R1 . the OSPF network would fail and each area would become its own network “island.1.0 192.0 ge-0/0/1.R4 R1 loopback R2 loopback R3 loopback R4 loopback Interface and Connections Listed in the OSPF Topology of Chapter 2 Interface IP Interface IP ge-0/0/0.1/30 10.168.0) forms the core of an OSPF network.2.1.168.0 ge-0/0/0.1/30 192.1/32 10. and interarea routing is supported via routers connected to the backbone area and to their own associated areas.

1 The best interface to use for this is the loopback interface address. R1 is the router chosen for this function. Ethernet topologies require a designated router (DR). The DR is responsible for advertising the LAN and advertising LSA’s to the backup designated router (BDR) and any router that is neither the DR nor the BDR (DROTHER). The IR is a router with all of its interfaces in a single area. even if all of the links are down. see Juniper Enterprise Routing. 14 Day One: Advanced OSPF in the Enterprise provides the ability to convey configuration information within the router ID. The initial OSPF configuration of R1 is as follows: [edit protocols] . The router types used in this example are Area Border Routers (ABR) and Internal Routers (IR). at http://www. The router ID can still be consistent and convey the location of a router or its use.juniper.wikipedia. and Harry Reynolds. 2nd Edition. The ABR router connects areas to the backbone area and keeps multiple copies of the link-state database for each area. The designations for these router types are as follows: „ R1: ABR „ R2: ABR „ R3: IR „ R4: IR MORE? For more information on OSPF router types please see http:// en. MORE? For an in depth discussion on how router ID’s affect OSPF networks.org/wiki/Open_Shortest_Path_First. which can be useful when viewing OSPF relationships. and to ensure that it is designated appropriately the interface priority is set manually. let’s say your large. Doug Marshcke. The configuration of the router ID is as follows: set routing-options router-id 10. international company has several subsidiaries located around the world. by Peter Southwick. This is necessary because a multi-access network type like Ethernet is used in the backbone.1. because as long as the router is functioning it’s always up.1.net/ books. For example.

0.255.0 1 Type: P2P. Configuring these links as P2P prevents using DR and BDR and simplifies the SPF calulations needed. Address: 192. BDR addr: 192.0 0. the network type displayed is LAN. since most of the time the routers are connected directly to one another. The other interface. This means a DR and BDR (which are backup designated routers) will be elected.0 10. Not Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 0 As you can see.1 10.0 interface ge-0/0/0. which is a broadcast network as far as OSPF is concerned.0.1.0.168.0 extensive Interface State Area DR ID BDR ID Nbrs ge-0/0/0.252.168.2.168.0 interface.168.2 1 Type: LAN.0. Dead: 40. Mask: 255. Address: 192. which is expected since it was configured this way on the ge-0/0/1. MTU: 1500.0 on R1. Cost: 1 DR addr: 192. Chapter 2: Single Domain Intra Area 15 set protocols ospf area 0.0. ReXmit: 5.1. Dead: 40. Again.1. ReXmit: 5. is in OSPF and it was not manually configured. the use of Ethernet is becoming a more prevalent technology).255.1.252.0 passive set protocols ospf area 0.1 interface ge-0/0/1.0.1. The command displays how to determine the type of network an interface is running as it pertains to OSPF: root@R1# run show ospf interface ge-0/0/1. the network type is P2P. ge-0/0/1.0 interface-type p2p Use the interface-type p2p command on the inter area links to force a WAN-like connectivity type (although with the advent of carrier provided Ethernet networks.0.255.255. NOTE Whether to use broadcast (LAN). . Cost: 1 Adj count: 1 Hello: 10. the command below shows how to determine the type of network an interface is running in OSPF: root@R1# run show ospf interface ge-0/0/0.0.0.1.0.0.0 PtToPt 0. Priority: 255 Adj count: 1 Hello: 10.2.0.1 0.0 extensive Interface State Area DR ID BDR ID Nbrs ge-0/0/1.1.1.0. as they are found on legacy WAN types. MTU: 1500.1.0 interface lo0.1. or P2P OSPF network types on Ethernet links.0. Not Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 0 As shown.0 priority 255 set protocols ospf area 0. Mask: 255.0 DR 0. is often debated.

0.0.0. html. by issuing the priority 255 command under the ge-0/0/0 interface within the OSPF configuration. Designated Router The function of a designated router within OSPF is forming adjacencies to all other routers on a multi-access network such as a LAN.0.1.1.0 BDR ID 10. the DR will form a neighboring relationship with the BDR.0. 16 Day One: Advanced OSPF in the Enterprise MORE? For more information on OSPF interface types see: http://www. If a failure occurs the BDR becomes the DR and a new election process begins electing a BDR. Step 1 Configure the priority: set protocols ospf Area 0.0.1.0 Nbrs 1 0 1 .1 0.0. If there is a tie.0 0. Multicast is used by OSPF as a communication mechanism to get to all routers within the LAN.0. OSPF will also elect a backup designated router and these two devices represent the multi-access network to outlying routers. In order to do this. All of the other routers within the multi-access network will be coded as DRother.0 DRother 0. net/techpubs/software/junos/junos94/swconfig-routing/interface-type.2 0.0.0 interface ge-0/0/0.255.0.0. With the DR elected.0. The default for Juniper is a priority of 128 but is configurable with a range of 0 . You also can manually configure the designated router (DR) for the Area 0 network. the highest Router ID wins. which means they will not be used as DR or BDR unless one or the other fails. A priority of 0 will assure that it does not become DR.0.0. It uses the multicast address 224.0.1 DR ID 10.0 PtToPt 0. set the priority to 255. All other routers will neighbor with the DR and the BDR.0.juniper.6 to elect a DR within this network.0.0 DR 0.0.0 lo0. The highest value for priority one can set is 255.1. The higher the priority the higher the chance of being the DR.0 priority 255 Here is the output to verify that R1 is the DR in this network: root@R1# run show ospf interface Interface State Area ge-0/0/0. thus assuring that the router is the DR for Area 0 within your OSPF network.0 0.0 ge-0/0/1.

0.1.1. which are done to make sure that R1 is the DR.1.0 lo0. This helps if any troubleshooting for OSPF is needed if a fault occurrs.2 0.0 BDR 0. The main advantage of this practice is that it limits the convergence on an OSPF network by not adding another peer.0.2 DR ID 10.0 priority 100 protocols ospf area 0.org/wiki/Open_Shortest_Path_First.0. This is a generally accepted practice that allows the loopback to be in the OSPF database but not to establish adjacencies. The configuration of R2 is very similar to that of R1 but with some minor differences.0 interface ge-0/0/0. Here are the configuration pieces important to this discussion: set set set set routing-options router-id 10.0.1. Now.wikipedia.0.1.2 interface ge-0/0/1. It should be set as passive.0.1. unexpected results would be seen in the network. This needs to be unique for every router in the network – if they were duplicated. as expected.0. It’s already been determined that R1 is the DR and that R2 is the BDR within our OSPF multi-access Area 0.0. the DR for the LAN connected to ge-0/0/0 is10. MORE? For more information on OSPF and the designated router.2 protocols ospf area 0. and to ensure that if there are more devices in the multi-access network. Loopback Interface Another piece of the configuration that needs to be set is the loopback interface.0.0.0 interface lo0. Verification that Area 0 is functioning as expected is paramount within OSPF networking.0.1.0 passive protocols ospf area 0.0 DRother 0.0 0.0 interface-type p2p The major differences between the two routers are the priority settings for the multi-access interface. R2 would be the BDR.0.0 0.0. Chapter 2: Single Domain Intra Area 17 As shown.0. This means that it is the DR for the Area 0 network as it is connected to R2.1. which is the loopback address of R1. check out http://en. here is the output for R2: root@R2# run show ospf interface Interface State Area ge-0/0/0.1.0 ge-0/0/1. The other difference is the router ID address.0.1 0.0.0. .0 BDR ID 10.0.0. In a larger network it would be wise to designate a single router as the DR for Area 0 with the priority command shown.0 PtToPt 0.0.0 Nbrs 1 0 1 R2 is showing that R1 is the DR for its connection as well.

1.1.1.1. or not. you might want to read the networking classic.1. . Router R3 will represent Area 1. Moy. and their names describe the state fairly well.0 root@R2# run show ospf neighbor area 0 Address Interface 192. and R4 will represent Area 2. 18 Day One: Advanced OSPF in the Enterprise Both of these routers have an adjacency displayed here: root@R1# run show ospf neighbor area 0 Address Interface 192.168.1. OSPF: Anatomy of an Internet Routing Protocol.2 ge-0/0/0. available wherever books are sold.0 State Full ID 10. There are eight possible OSPF states: „ down „ attempt „ init „ 2-way „ exstart „ exchange „ loading „ full MORE? For complete information on the different adjacency states in OSPF. If the adjacency state is not full it means there is an issue with the OSPF hello packets not being sent or received on one or both devices.1 Pri 255 Dead 37 As you can see. two more devices need to connect to the network from separate areas: Area 1 and Area 2. the adjacency state between R1 and R2 is full with the proper router ID for each device.2 Pri 100 Dead 37 State Full ID 10. OSPF neighboring states are how you determine if the peering relationship is up. Configuration of the Outlying Areas According to our chapter topology in Figure 2. This can be caused by a multitude of issues.1. but the most common cause is is a misconfiguration between the devices. that the adjacency is still forming. by John T.168.1 ge-0/0/0. or there is a disagreement in the configuration between the devices.

0 passive The configuration makes this router basically a non Area 0 router. you can limit this activity to an individual area and lessen the impact on the SPF calculations for the entire network by using multiple areas. Keep in mind that this is now the router ID for the router in all routing protocols going forward.0 State Full ID 10. Chapter 2: Single Domain Intra Area 19 This might raise the question: Why do we even have multiple areas in OSPF? The answer is.1. verification of a OSPF adjacency is needed to validate that the neighbor relationship is completed: root@R3> show ospf neighbor Address Interface 192.0.3 Step 2 Next configure the OSPF protocol itself. which is described in more detail in Chapter 3.0. LSA flooding could cripple your network and cause routers to continually conduct SPF calculations.1 Pri 128 Dead 39 .0.0.1.1 ge-0/0/0.168. or essentially a stub router. but you will note that the area is different: set protocols ospf Area 0. Step 1 Configure the router ID: set routing-options router-id 10. in order to decrease the size of the link-state database within the area of a network. thus leading to suboptimal convergence. Step 3 Once the configuration is commited and everything is connected between R1 and R3.1 interface ge-0/0/0. Configuration of R3 The first step in configuration of OSPF for R3 is to add the router ID for this device. As your network gets larger.2. And this is why OSPF can scale so well with your network and your network’s future.1 interface lo0.1. With too many routers and links within large networks. This is very similar to the backbone routers cited earlier.0 interface-type p2p set protocols ospf Area 0.1.

2 ge-0/0/0. with the exception of the area.2 Pri 128 Dead 36 This verifies that an adjacency is made between R4 and R2 and completes the initial configuration of our simple OSPF network.3 Pri 100 128 Dead 34 32 Configuration of R4 Configuration of R4 is almost exactly like the configuration of R3.0. just the output from the device: set routing-options router-id 10.2 interface lo0.0 interface-type p2p set protocols ospf Area 0.0. let’s make R4 part of Area 3.1. and then limit the link-state database by taking the diverse end point routes and representing all of them as a single route for the table. Since the configurations are virtually the same between R3 and R4 it’s not necessary to explain the process. End points need to be represented by routes through the network.1. with the exception on the peering between R1 and R2: root@R1> show ospf neighbor Address Interface 192.2. This action is know as route summarization.1.0 State Full ID 10.168. 20 Day One: Advanced OSPF in the Enterprise This operational command shows that the adjacency is formed and the neighboring state between the two routers is full. Step 4 There is a similar output on R1 as well. .4 set protocols ospf Area 0.2 10.0 192. Let’s get these routes through the network.168.0.1. For this example.1 ge-0/0/0.0 passive root@R4> show ospf neighbor Address Interface 192.168.3.1.0 State Full Full ID 10. Use and Configuration of Summarization Our simple example network is of limited use without end points to route to.1. validating that OSPF is running properly.0.2 ge-0/0/1.1.1.2 interface ge-0/0/0.1.

but as a single route entry. so the whole area can be represented by a single address range.2. Chapter 2: Single Domain Intra Area 21 Route summarization requires careful planning of the addresses within a network. The most common practice to combat poor address allocation is to assign a contiguous set of addresses to an OSPF area.168.16. 0 hidden) + = Active Route.1.1. 14 routes (14 active.1.0: 14 destinations.= Last Active.168. 0 holddown. Summarization is typically done on the ABRs.18.0 10.2/32 *[OSPF/10] 05:26:48.0/24 192.2 Example Network R2 Without summarization the routing table and OSPF database look like this: root@R1> show route inet. In this example.0/30 192. as opposed to three different routes.1.0 10.168.168.1. * = Both 10. as shown in Figure 2. metric 1 > to 192.2 via ge-0/0/0.1.168. Connected Routes 192.0 . This way Area 1 and Area 2 can see each other’s routes. metric 1 > to 192.1/32 *[Direct/0] 4d 07:02:04 > via lo0.3/32 *[OSPF/10] 01:44:58.1.2. since companies often acquire or merge with other businesses and want to integrate their systems into an existing network.17. .0/23 R4 Area 2 R3 Area 1 Area 0 R1 Figure 2. In large networks it can be troublesome.2 via ge-0/0/1. R1 and R2 perform the summarization for Areas 2 and 3 respectively.

1 Router 10. summarizing benefits the network administrator.168.168.0 10.168.0 *[Local/0] 4d 07:20:26 Local via ge-0/0/0.168.2.2.1.1.1.1. these routes are contiguous and can be combined into a single summary route to be advertised to all other areas.168.16.10.1.2 via ge-0/0/0.4 10.168.168.168.16.168.2 are shown on R1.0/23 224.1.1.16.168.0 *[OSPF/10] 00:01:03.168.0 *[OSPF/10] 00:01:03.1.1 Summary 10.1. Area 0. metric 3 > to 192.1.1.0/30 192.1.3 10. metric 2 > to 192.1.1/32 192.1.168. metric 3 > to 192.0/30 192.2 via ge-0/0/0.168.0.168.1.1/32 192. metric 4 > to 192. The routes above can be summarized into a single route of 192.1.1.0 10.1.3.1.2 Summary 192.2.18.1.1. 22 Day One: Advanced OSPF in the Enterprise 10.2 Seq 0x800000ad 0x800000ad 0x8000007f 0x80000003 0x80000005 0x80000004 0x80000007 0x80000003 0x80000001 0x80000001 0x8000000d Age 235 208 2982 1484 2876 1234 223 208 208 208 1846 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0xd89e 48 0xec86 48 0x5fcb 32 0x68b5 28 0x54c5 28 0x447f 28 0x2d91 28 0xaf05 28 0xc4ec 28 0xaa08 28 0x36da 28 Routes listed in Figure 2.2 Summary 192.0/30 192.17.0 *[Direct/0] 01:44:59 > via ge-0/0/1.1 Summary 192.1 10.168.168.4/32 10.18.1.2 ASBRSum 10.1.1.0/30 192. and the network itself.2 via ge-0/0/0.0 Type ID Adv Rtr Router *10.1.2 Summary 192.1.1. Convergence assists in troubleshooting.1.0 10.168.17.1 Summary *10.5/32 *[OSPF/10] 01:14:50.1.1.99/32 192.1. As stated before.1. by keeping the route table and the link-state database smaller.0.0/21 and still have room for growth.168.168.1.2 Network *192.0 10.0 10. although it requires some planning to keep addressing localized to OSPF areas. .4 10.0/24 192.2 via ge-0/0/0.1.1 10.1.1.0 *[Local/0] 4d 07:35:34 Reject *[Direct/0] 4d 02:37:43 > via ge-0/0/0.2 via ge-0/0/0.1.0.1. metric 2 > to 192.0 *[OSPF/10] 00:01:03.2.0 *[OSPF/10] 4d 07:15:36. metric 1 MultiRecv root@R1> show ospf database area 0 OSPF database.2 Summary *192.0.0 *[Local/0] 4d 06:28:00 Local via ge-0/0/1.168.1.1.3.0 *[OSPF/10] 01:55:34.1.2 10.1.

168.1.0/30 *[Direct/0] 4d 02:30:38 > via ge-0/0/0. Here is the configuration: Step 1 First the configuration to summarize the routes: set protocols ospf area 0.1.1.1 10.0 192.1.= Last Active.1.1.2 10.0.1 Seq 0x800000ac 0x800000ac 0x8000007f 0x80000003 Age 2873 2259 2623 1125 Opt 0x22 0x22 0x22 0x22 Cksum Len 0xda9d 48 0xee85 48 0x5fcb 32 0x68b5 28 .1.2.168.1.2. 12 routes (12 active.1/32 *[Local/0] 4d 06:20:55 Local via ge-0/0/1. metric 2 > to 192. metric 1 > to 192. 0 holddown.0 192.1.4/32 *[OSPF/10] 01:07:45.0.1 Router 10.1.168.2/32 *[OSPF/10] 05:19:43.0 224.2. 0 hidden) + = Active Route.1.3 10.0 10.0/30 *[OSPF/10] 01:48:29.3/32 *[OSPF/10] 01:37:53.1.3.2 via ge-0/0/1.Verification of the summary being sent can be seen on R1 and R3: root@R1> show route inet.0 10.168.1.168.2. R2 then advertises the summary route to Area 0.16. * = Both 10.168.0/21 *[OSPF/10] 01:06:57.0.0: 12 destinations.2 via ge-0/0/0.1.1.1.2 Network *192.168. Area 0. metric 2 > to 192.2 via ge-0/0/0.168.0 Type ID Adv Rtr Router *10.0. Chapter 2: Single Domain Intra Area 23 The configuration to summarize the routes is completed on R2 since it is the ABR for Area 2.0 192.5/32 *[OSPF/10] 4d 07:08:31. metric 1 MultiRecv root@R1> show ospf database area 0 OSPF database.1/32 *[Direct/0] 4d 06:54:59 > via lo0.0/30 *[Direct/0] 01:37:54 > via ge-0/0/1.1.1 10.1.2 via ge-0/0/0.0/21 You can see the configuration is very simple.2 area-range 192.10.168.1 Summary *10.0.0 10. metric 4 > to 192.1.99/32 *[Local/0] 4d 07:28:29 Reject 192.16.1.1.168.168.0.1. . metric 1 > to 192.168.1.1.1/32 *[Local/0] 4d 07:13:21 Local via ge-0/0/0.1.1.1.1.0 192.0 192.168.1.0 10.2 via ge-0/0/0.

1.1.1.16.1 Type ID Adv Rtr Router 10.2 0x80000006 Summary 192. metric 3 > to 192.0: 12 destinations.1.1.0 192.2.2.168.168. metric 1 > to 192.168.1.4 10.0.2/32 *[OSPF/10] 01:57:09.0 192.168.0.3 10. * = Both 10.0 10.0 10.1.1.0 224.0 10.1.2 0x80000005 10.1.1.2.0.1 via ge-0/0/0.168.1 ASBRSum 10.1.0 192.1 via ge-0/0/0.0.2 0x8000000d 2517 0x22 0x54c5 28 875 0x22 0x447f 28 2774 0x22 0x2f90 28 0x80000002 1229 0x22 0xaa0e 1487 0x22 0x36da 28 ASBRSum 10.= Last Active.1.1 Router *10.1 Summary 10.2/32 *[PIM/0] 04:08:28 MultiRecv 224.1.1.3.168.2 10.1 0x80000004 10.1.1.1 via ge-0/0/0.1.1 Summary 192.1 via ge-0/0/0.1.168.0 10.0/30 *[Direct/0] 01:57:10 > via ge-0/0/0.168.1.2.1.0.0.23.3 Summary 10.1.2.168.168.1 Summary 10.1.4 Summary *192.168.0 192. metric 5 > to 192.1.1.1 via ge-0/0/0.2.1.168. metric 2 > to 192.0/30 *[OSPF/10] 01:57:09.0/30 *[OSPF/10] 01:57:09.0 10.1.1.2.168.168.1.1.1.3.1. 24 Day One: Advanced OSPF in the Enterprise Summary 10.0 192. .0. metric 1 MultiRecv 224.1 Summary 192.1.1.4/32 *[OSPF/10] 01:27:00.1 via ge-0/0/0.1.1.3/32 *[Direct/0] 04:08:25 > via lo0. 12 routes (12 active.1.168.1.1. metric 3 > to 192.2/32 *[Local/0] 04:08:09 Local via ge-0/0/0.1.1. 0 holddown.255 10.4 lab@R3> show route inet.0.0 10.1.0 10.1.1.168.1.1/32 *[OSPF/10] 01:57:09.5/32 *[OSPF/10] 04:08:28.4 10.2.1.168.1.1.3.1 Summary 192.1.0 Summary 192.1 10.1.16. Area 0.1.1 Seq 0x80000019 0x80000019 0x80000082 0x8000007d 0x80000006 0x800000bd 0x80000004 0x80000001 0x80000005 Age 1635 1060 1385 422 208 2634 1136 213 2883 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x4fbc 48 0x9852 60 0x732e 28 0x7d27 28 0x62b6 28 0xdb2f 28 0x437e 28 0x6f43 28 0x56c2 28 .2. 0 hidden) + = Active Route. metric 2 > to 192.2 28 10.1 10.13/32 *[PIM/0] 04:08:28 MultiRecv lab@R3> show ospf database area 1 OSPF database.1.0/21 *[OSPF/10] 00:02:29.1.1.

data 192.1. Bidirectional Type: PointToPoint.16. data 255. Type Stub (3) Topology count: 0.1.168.1.16.1.1. Area 0.0.1.255.4 10.168.2 Metric: 1.0.1. like the one in this example.0 Type ID Adv Rtr Seq Summary *10.10 0x80000001 mask 255. Chapter 2: Single Domain Intra Area 25 In a small network.2.255. Default metric: 1 id 192.4 10.4 10.1.2 0x80000002 mask 255.1. Type Stub (3) Topology count: 0.2 0x80000004 mask 0.1.2 Type ID Adv Rtr Seq Router 10.255 Topology default (ID 0) -> Metric: 1 ASBRSum *10.3. data 255.255. Type PointToPoint (1) Topology count: 0.1. Default metric: 1 id 192.255.1.1. but in a larger network. Node ID: 10. those of R2 and R4. Let’s take a look at how to do that from two different perspectives.1.0.2 Metric: 1. Default metric: 1 id 10. it is hard to see how summarization would be a benefit.1.252.0.255.4 0x80000012 bits 0x2.4 detail OSPF database. Type Stub (3) Topology count: 0.1.1.1.168.1.255.1. data 255. with many end points and hundreds of routers. data 192.4 10.0.1.1.1.255. link count 5 id 10. Default metric: 1 id 192. Default metric: 0 Topology default (ID 0) Type: PointToPoint.16.1. Step 1 First let’s look at R2: [edit protocols ospf] lab@R2# run show ospf database lsa-id 10.0.16.0 Topology default (ID 0) -> Metric: 1 ASBRSum 10.1.255 Topology default (ID 0) -> Metric: 1 Summary 10.4.1.255.0.2.255.255.3.0. The final step in this chapter is verifying the LSA types from the configured routers. the use of summarization is paramount to a stable OSPF and therefore to a stable network. Bidirectional Age 41 Opt Cksum Len 0x22 0x5ac2 28 143 0x22 0x2ce9 28 41 0x22 0x48d1 28 133 0x22 0x18f9 28 Age 42 Opt Cksum Len 0x22 0xf864 84 (1) .168.255. Type PointToPoint Topology count: 0.252.168.0. Node ID: 192.4 10.168. Area 0.10 0x80000004 mask 0.0 Topology default (ID 0) -> Metric: 1 OSPF database.1.1.1.0.2.

1. The next chapter focuses on more advanced OSPF topics that a network engineer may see due to mergers and acquisitions with other enterprises or simply because of aggressive growth of the enterprise and therefore the network.1.1. The fundamentals of a single routing domain inter area network do not change by network size.168. Planning is one of the most important steps one can make in designing a network. as well as other outlying areas to contend with.1.4 Metric: 1.3.1.2 0x80000002 mask 255. in this example network.1. In every large OSPF network there will be an Area 0.1. Node ID: 10. Default metric: 1 id 192. data 255.0. 26 Day One: Advanced OSPF in the Enterprise The above output shows that R2 is receiving type-1 and type-3 LSAs from R4.1. Type PointToPoint (1) Topology count: 0.2 detail OSPF database.1.255.4.252. Bidirectional Summary 10.168.0. data 192. link count 2 id 10.1.255. Summary OSPF.2 10. Area 0. This is the expected behavior that you should see from this router to the backbone Area 0. These LSAs would be seen in a normal scenario for this device. although many times network engineers do not get to design the OSPF network. there are type-1 and type-3 LSAs received from R2.1. they just inherit it.255. .2 0x80000006 bits 0x3. is fairly simple and small. Step 2 Next is to check the LSAs on R4: root@R4# run show ospf database lsa-id 10.255 Topology default (ID 0) -> Metric: 0 Age 310 Opt Cksum Len 0x22 0x9780 48 66 0x22 0x64bb 28 As shown here.1.1.2 10.255.2 Type ID Adv Rtr Seq Router 10.3.1.0. Default metric: 1 Topology default (ID 0) Type: PointToPoint. Type Stub (3) Topology count: 0.1.

. . . . . . . . . . . . . .31 Summary . . . . . . . . . . . . . . . . . . . . 42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Totally Stubby Area . . . . . . . . . . . . . . . . .Chapter 3 Stubbiness Without Stubs . . . . . . . . . . .

0 route. Figure 3.net/books In this chapter you will learn how to configure two different. 28 Day One: Advanced OSPF in the Enterprise This chapter focuses on OSPF stub areas. Without Stubs This chapter’s network example uses the previous design from Chapter 1.0. and that the LSA types seen. and are represented by a default 0. The focus is on Area 1. are correct. receive externals that orginated from the OSPF routing domain. Stub areas do not receive external routes from outside the OSPF autonomous system. by Peter Southwick. but with static routes in Area 2 to represent external routes coming from outside of the OSPF autonomous system. „ NSSA Not So Stubby Area: advertise external routes. MORE? For more information on stub area types within OSPF please see Juniper Enterprise Routing. „ NSSA Totally Stubby Area: same as NSSA except receives a default only.1 diagrams the use case for this chapter. at http://www. which will be the stub area. 2nd Edition. and Harry Reynolds. This will be the control and baseline for how stub networks can assist network engineers in managing their outlying area link-state databases and routing tables. internal summaries only. but common. types of OSPF stub areas using Juniper Networks routers running Junos. .0.juniper. Doug Marshcke. OSPF can support several types of stub areas: „ Stub Area: no external routes. „ Totally Stubby Area: receive only a default route. Initially the static routes are shown in Area 1 as they would appear without any stubbiness configuration. The types of OSPF stub areas that will be used are Totally Stubby Areas and NSSA Areas. These are generally the most widely used stub area types and by chapter’s end you will be able to verify that the configuration is performing as desired.

MORE? OSPF route redistribution is covered in more detail in Chapter 4. Chapter 3: Stubbiness 29 R4 Static Routes 192.0/24 next-hop 192.0/24 next-hop 192.1/24 192.2 set routing-options static route 192.168.30.1 Example Network with Stubs Area 2 R2 The configuration changes that are different from Chapter 1 occur on R4. Step 1 Configuration of the static routes on R4: set routing-options static route 192.168.168. distribute these routes into the OSPF process.168. Step 2 Configuration of redistribution of the static routes into OSPF through a routing policy: set policy-options policy-statement redistribute-static term 1 from protocol static set policy-options policy-statement redistribute-static term 1 then accept .29.168.1/24 R3 Area 1 Area 0 R1 Figure 3.2 Next.30. which is needed to show these routes as external LSA’s.29.16.16.168.

168.1.0 10.3/32 Intra Network 10.168.3.0 Nexthop Address/LSP 192.2 192.168.29.2/32 Intra Network 10.4/32 Inter Network 192.0 0 ge-0/0/0.2 192.0/21 Inter Network 192.1.168.2 192. configuration to allow the distribution to happen within OSPF. Step 3 Configuration of the redistribution process into OSPF on R4: set protocols ospf export redistribute-static Once these entries are committed to the configuration.0/30 Inter Network 192.0 1 ge-0/0/1.0 2 ge-0/0/0.4 10.4 0x80000001 Extern *192.1.0.1.0/24 Ext2 Network NH Type IP IP IP IP IP IP IP IP IP IP IP IP IP Metric NextHop Interface 1 ge-0/0/0.1.0 2 ge-0/0/0. the routes 192.0/30 Intra Network 192.2 192. R1 is in the backbone Area 0.2 Type ID Adv Rtr Seq Router *10.1.168.168.1.168.1.4 Inter AS BR 10. Area 0.2 Intra Area BR 10.1.0 2 ge-0/0/0. which means they are external to the OSPF network and that OSPF has no knowledge of these routes beyond the OSPF autonomous system.30.29.0 and 192.168.0 1 ge-0/0/0.30.1. allowing the router to advertise these static routes into the OSPF process.1.1.0 4 ge-0/0/0.168. 30 Day One: Advanced OSPF in the Enterprise Lastly.1. the OSPF process starts advertising these static routes into Area 0 of this OSPF process.4 0x80000005 OSPF AS SCOPE link-state database Type ID Adv Rtr Seq Extern *192.1. .1.168.3 Intra Router 10. Let’s check: root@R1> show ospf route Topology default Route Table: Prefix Path Route Type Type 10.0 1 ge-0/0/0.1.0/30 Intra Network 192.168.0 are being advertised into OSPF as external routes.2 192.2 192.168.1/32 Intra Network 10.1.2 These routes are being learned as type-5 LSA’s.168. and should see these routes as external.0 1 ge-0/0/1.1.1.1.4 0x80000001 Age 274 Age 274 274 Opt Cksum Len 0x22 0x2db1 96 Opt Cksum Len 0x22 0x8d8e 36 0x22 0x8298 36 As displayed.1.1.168.2 192.1.1.1.168.168.2 192.2.1. Proof can be seen on R4 as shown here: root@R4> show ospf database advertising-router self OSPF database.1. Next.168.29.0 0 ge-0/0/0.30.2.0 0 lo0.0/24 Ext2 Network 192.168. it’s necessary to see how R1 is interpreting these routes.1.1.2.168.0.0 10.2 192.1.0 1 ge-0/0/1.168.1.16.

0/24 Ext2 Network NH Type IP IP IP IP IP IP IP IP IP IP IP IP Metric NextHop Interface 1 ge-0/0/0.0/30 Inter Network 192.2. is a totally stubby default LSA route.0 Nexthop Address/LSP 192.1 192. you can see these static routes show up in the OSPF routing table as external routes after traversing the backbone area.1 192.168.1. must see these routes.0 3 ge-0/0/0.1 192.2/32 Inter Network 10.1 192.0 0 lo0.0/30 Inter Network 192. R3.168.1.168.168.3/32 Intra Network 10.0/21 Inter Network 192. which is in Area 1.29.168.1 192. which is in another outlying OSPF area. which lowers system resource utilization.2.168.0 1 ge-0/0/0.1.168.168.1 192. The configuration for a totally stubby area starts at the area border router (ABR) and the configuration for R1 needs to be changed to support a totally stubby area.2.0 2 ge-0/0/0.168. it does not allow external routes or summary routes.0/24 Ext2 Network 192.168.2.2.1 Intra Area BR 10.1.168.0 0 ge-0/0/0. fewer routing decisions have to be made by the route processor.1 Again.30. The only way for traffic to get routed outside of the area is a default route.2.168. Totally Stubby Area If your goal is to achieve the absolute minimal link-state database and routing table.1.0/30 Intra Network 192.4/32 Inter Network 192. Inter-area (LSA3 or IA) routes are not summarized into totally stubby areas. When there is only one route out of the area. Step 1 The configuration of R1 is as follows: .16. and memory usage. So let’s check R3: root@R3> show ospf route Topology default Route Table: Prefix Path Route Type Type 10. totally stubby areas are the best choice.168.0 3 ge-0/0/0.2.1. A totally stubby area is similar to a stub area. as this chapter refers to it again.1 192.2.4 Inter AS BR 10.0 3 ge-0/0/0.168.2.0 1 ge-0/0/0.2. Chapter 3: Stubbiness 31 Lastly.1.1.168.0 0 ge-0/0/0.0 2 ge-0/0/0.0 5 ge-0/0/0.168. This is represented by a type-7 LSA which. even on R3. Remember this routing table.2. as external.1.1 192. along with all of the other routes within the OSPF autonomous system.3.1 192.1/32 Inter Network 10.1. as stated above.1. however.1.1.

The configuration of R3 is the next step in configuring a totally stubby area within OSPF. } } area 0. Step 2 Now let’s check the complete OSPF configuration on R1: [edit protocols ospf] root@R1# show area 0.0.0. There is also the addition of default-metric 5 to the existing configuration. as it is really just one command added to the router: set protocols ospf area 0. interface ge-0/0/1.0 { interface-type p2p.0.0.1 stub default-metric 5 set protocols ospf area 0.1 stub no-summaries The no-summaries part of the statement is what makes this a totally stubby area within the Junos configuration. } interface lo0. 32 Day One: Advanced OSPF in the Enterprise set protocols ospf area 0.0 { interface ge-0/0/0. this command forces the R1 to send a type-3 summary LSA with a default route to the outlying area R3 with an initial metric of 5.0.0.0.0.0.1 stub This forces the router into a stub area mode like in the previous configuration. The portion that has no-summaries tells the configuration within OSPF not to send summary routes to the stub Area 1. } } The commands added to the configuration are centered around the stub command. the routers will not agree.0.0.0 { passive.0.1 { stub default-metric 5 no-summaries. Step 1 Adding this set is very simple. and so will not peer. If the routers on both ends of a neighboring relationship do not have this command. .0 { priority 255.1 stub set protocols ospf area 0.

.1 10.0.0. 0 hidden) + = Active Route.2.1 { stub.168.0.1.1.0: 7 destinations.0.0. 7 routes (7 active.3/32 *[Direct/0] 02:54:16 > via lo0.1 0x80000002 Summary *0.5/32 *[OSPF/10] 02:54:20. } } When these configuration changes are committed to the routers.1 Type ID Adv Rtr Seq Router *10.0 { passive.2/32 *[PIM/0] 02:54:19 MultiRecv 224.0.1 0x80000015 Area 1 Age 357 723 Opt Cksum Len 0x20 0x9b89 48 0x20 0x42d6 28 . the route table of R3 should show a single route learned from the backbone Area 0: {master:0}[edit protocols ospf] root@R3# run show route inet.0 10. Area 0.1 via ge-0/0/0.0 192.1.1.0/30 *[Direct/0] 02:53:54 > via ge-0/0/0.2. This keeps the routing table for R3 at a minimum.0.168.2.0.0. Another option for verification is looking at what R1 is sending to R3 using the following command: root@R1# run show ospf database advertising-router self OSPF database.168.1.1.0 10. Chapter 3: Stubbiness 33 Router R3’s complete OSPF configuration looks like this: {master:0}[edit protocols ospf] root@R3# show Area 0. and allows network engineers to utilize a much smaller device within the outlying areas.0. interface ge-0/0/0. which happens to be R1.13/32 *[PIM/0] 02:54:19 MultiRecv The route table shown here has a default route to the upstream backbone router at 192.0.0/0 *[OSPF/10] 01:41:25.0 224.1.0.1.0. metric 1 MultiRecv 224.0 192. } interface lo0.168.1.0.= Last Active.0 { interface-type p2p. 0 holddown. metric 6 > to 192.2/32 *[Local/0] 02:53:57 Local via ge-0/0/0. * = Both 0.2.

34 Day One: Advanced OSPF in the Enterprise As shown here.30.168. Sometimes a network engineer may want to send more than just a default route.1/24 192. as well as to all other routers within its local area. The visual description in Figure 3. R5 RIP Network Static Routes 192.168. basically causing the ABR to act like an ASBR for external routes.29. they may want import external LSA’s to the route table.1/24 R3 Area 1 Area 0 R4 Area 2 R1 R2 Internet Figure 3.2 Network Example With an NSSA Area . This means that a router in the NSSA router can connect to a non OSPF routing domain and advertise those routes to the backbone area.2 should help clarify how this works. R1 advertises only its router LSA and the default route to Area 1. but the NSSA area will not receive any external routes from the backbone area itself. Not-So-Stubby Area The purpose of a not-so-stubby area is to allow type-7 LSA’s to be converted to type-5 LSA routes. Let’s review that option in the next section.

1/30 192. at http://www.2.1 Link R1 .0 lo0.0 192.1.0 192. and these routes will be added into the OSPF network through OSPF Area 1 as an NSSA LSA. R5.0 ge-0/0/1.0 lo0.1.juniper.168.R3 R2 . MORE? For more information on the RIP routing protocol see Juniper Enterprise Routing.1/30 10.1.2.R4 R1 loopback R2 loopback R3 loopback R4 loopback R5 – R3 Updated Address Table for R5 Interface IP Interface IP ge-0/0/0.2. are not shown here.2/30 192.1/32 10. Table 3.0 ge-0/0/0.3. Chapter 3: Stubbiness 35 In Figure 3. RIP is used only as a means to show external routes.4/32 192.1.168.0 ge-0/0/0.1. a new router is added to the existing design. by Peter Southwick.1. Doug Marshcke.0 lo0.2/32 10. Those routes are summarized into a default route in much the same way as a totally stubby area.168.0 192. and Harry Reynolds.0 ge-0/0/1. The most common deployment for a not-so-stubby area occurs when a newly acquired or merged company needs connectivity into an existing network. Table 3.70. as they are outside the scope of this book.168.1.1 lists the IP address table updated with the new router.2/30 192.2/30 ge-0/0/1. Connecting it directly to the core of the OSPF network is not commonplace.1.1/30 192.1. 2nd Edition. R3 won’t receive any external LSA’s from R1 that didn’t originate from the OSPF network. .0 lo0.168.70. For this exercise.net/books.3.168.1. as stated.3/32 10. as described in the previous section.1/30 The configuration of R5. so using a outlying router to connect this new network to the existing network is the best practice.0 lo0. and the RIP configuration of R3.168.168.R2 R1 .2/30 ge-0/0/0. R5 advertises routes to R3 via routing protocol RIP.

1 nssa nssa default-lsa default-metric 1 nssa default-lsa type-7 nssa summaries And with these additions the total OSP configuration for R1 looks like this: [edit protocols ospf] root@R1# show Area 0. In the end. the NSSA area converts type-7 LSA’s into type-5 LSA’s. } interface ge-0/0/1.1 0.0 { interface-type p2p.1 0. } summaries.0. The next command you need includes the default-lsa type-7 command that forces the use of a type-7 LSA. If you recall.0. your logical starting point would be with R1. Similar to the stub configuration.0. the defaultlsa default-metric commands force R1 into sending a default route to Area 1’s downstream R3.1 { nssa { default-lsa { default-metric 1. R1 advertises a default route.1 0.0 { priority 255. } interface lo0.0.0 { passive. .0. } } Area 0. } } Note the configuration additions that are around the NSSA statement within Area 1 of OSPF.0.0.0. type-7.0.0. armed with this information.0. Step 1 First let’s configure R1: set set set set protocols protocols protocols protocols ospf ospf ospf ospf Area Area Area Area 0. Just as in the previous section. which is all of the routes that are generated from the OSPF autonomous system. 36 Day One: Advanced OSPF in the Enterprise So. The default route is advertised to R3 for the external routes from R4 (from the previous section).0 { interface ge-0/0/0. the additions to the configuration are fairly minimal.0.

0/30 *[OSPF/10] 01:51:30.168.1 nssa The completed configuration for R3 looks like this: [edit protocols ospf] root@R3# show export redistribute RIP. 18 routes (18 active.1 { nssa.1.1. in turn. MORE? For more information on route policies within Junos please see http:// www. metric 2 > to 192.168. Chapter 3: Stubbiness 37 Step 2 Next. Area 0.0.1 via ge-0/0/0.2.2. 0 hidden) + = Active Route.0 10.1/32 *[OSPF/10] 01:51:30.1.net/techpubs/en_US/junos9.168. The other part of the configuration to note is the added export redistribute RIP command used to redistribute the created RIP routes to show external routes coming into the area through a policy.0.0 192. Let’s verify that R3 is receiving the correct LSDB and.1 via ge-0/0/0. metric 3 > to 192.168. . metric 2 . } } Quick observation reveals that there is not much change in the configuration for R3 from the previous sections.2. metric 2.0. the correct routing table.0.0. 0 holddown. tag 0 > to 192.0 { interface-type p2p. which makes the area a not-so-stubby area.1. The only real change is adding the NSSA command for Area 1. using the following commands: root@R3# run show route protocol ospf inet.6/information-products/ topic-collections/config-guide-policy/frameset.168.1.0 { passive.html. the configuration of R3 is needed to see an LSA exchange completed between R1 and R3: set protocols ospf Area 0.1 via ge-0/0/0.= Last Active.0/0 *[OSPF/150] 01:16:05.1.juniper.0 10.0: 18 destinations.1.2/32 *[OSPF/10] 01:16:05.1 via ge-0/0/0.0 10.0.4/32 *[OSPF/10] 01:16:05.2. interface ge-0/0/0. } interface lo0. metric 1 > to 192. * = Both 0.

1.168.1 0x80000005 Summary 192.0 10.0.2 via ge-0/0/0.1.1.0: 17 destinations.1.1.0 10.168.168.1.1.1.0 192.1.1 via ge-0/0/0. metric 1 MultiRecv root@R3# run show ospf database OSPF database.0: Area 0.2.0 10.1.0.3 0x80000003 root@R3# run show ospf database summary Area 0.1.1 0x8000000e Summary 192.0 .1.0. 0 holddown.168.3.1.72.1.168. as well as a default route for the networks that are listed as external from the outlying Area 2.71.1.2.0 10.4 10.3 10.1.168.0. * = Both 10.1. This is one of the reasons to use a NSSA OSPF area – with a stub area.0 10.168.0.168.1.1. metric 1 > to 192.3 0x80000010 Summary 10.3.1. metric 3 > to 192. no routes are seen.1.0 10. You should note that R3 is also advertising the routes that have been redistributed from RIP.0/21 *[OSPF/10] 01:16:05. .1 0x80000011 Router *10.1.1 Type ID Adv Rtr Seq Router 10.1.1.1 0x80000003 NSSA *192.1 via ge-0/0/0. metric 5 > to 192.168.0.168.1 via ge-0/0/0.0. Area 0.2 10.1.1 0x80000005 Summary 192.0: Area 0.0 *[OSPF/10] 01:16:05.0 224.1.0 and 192.5/32 *[OSPF/10] 01:56:31.0.1.1.1 0x80000005 Summary 10.0.1.168.= Last Active.16.1: Interface lo0.3 0x80000003 NSSA *192.0.1 10.1.1.72.71.1 0x80000005 Summary 10.1 0x80000005 NSSA 0.168.1 10.16.1. These routes are 192.2. 38 Day One: Advanced OSPF in the Enterprise > to 192. Let’s check: root@R1# run show route protocol ospf inet.0. Verification that the backbone R1 is correctly receiving the external routes from the upstream router is necessary to show the OSPF route table and OSPF link-state database on R1.0.1.0/30 Age 395 2112 995 2343 2156 1596 1969 1783 2530 1350 514 Opt 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x28 0x28 Cksum Len 0x8390 48 0xce25 60 0x8c94 28 0x8c92 28 0x8299 28 0x5963 28 0x5f63 28 0xd2e4 28 0x160d 36 0xfc8 36 0x4d2 36 You can see from the output here that R3 is receiving routes from within the OSPF autonomous system.2/32 *[OSPF/10] 01:28:47.1: 192.1. 17 routes (17 active.1.168.1: 2 Router LSAs 12 Summary LSAs 4 NSSA LSAs Externals: Interface ge-0/0/0. 0 hidden) + = Active Route.1.0.

metric 2.0/24 *[OSPF/150] 01:28:47.1.29.71.1.168.0.4/32 *[OSPF/10] 01:28:47.168.1.3.1.1.1 0x80000004 Summary 10.0.1.0 Type ID Adv Rtr Seq Router *10.1 0x80000004 0 0 0 0 Age 772 988 572 2171 1449 1971 1911 1219 972 2373 Age 1172 502 1772 172 2932 2372 2746 2559 372 2129 1292 Age 1882 1104 1572 1372 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Opt 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x28 0x28 Opt 0x22 0x22 0x22 0x22 Cksum Len 0x724d 48 0x8a38 48 0xfa7e 32 0x66b6 28 0x56c4 28 0x3e82 28 0x2d91 28 0xa610 28 0x54c5 28 0x3ad8 28 Cksum Len 0x8390 48 0xcc26 60 0x8c94 28 0x8a93 28 0x8299 28 0x5963 28 0x5f63 28 0xd2e4 28 0x140e 36 0xfc8 36 0x4d2 36 Cksum Len 0x8791 36 0x7c9b 36 0x8f51 36 0x845b 36 .2 via ge-0/0/1.1.0/21 *[OSPF/10] 01:28:47.1 0x80000004 NSSA 192.2. metric 1 MultiRecv root@R1# run show ospf database OSPF database.168.0 10.0/24 *[OSPF/150] 01:31:02.2.2 via ge-0/0/0.0 192.1.168.0 10.1.1.0 10.0.0 192.168.1.0 10.3 10.1.168.168.0 10.72.1.2 10.2 0x80000007 Summary 192.1.2 via ge-0/0/0.3 0x80000003 NSSA 192.2.1.1.4 0x80000004 Extern 192.0 192.0 10.4 10.0 10.1.1.1 0x80000005 Summary *192.1.1.1.0 10.2 via ge-0/0/0.1.2 0x80000004 ASBRSum *10.2 via ge-0/0/0.168.1.1.1.1.1.168.0 10.3.0/24 *[OSPF/150] 01:28:47.29. metric 0.168.1 0x80000011 Router 10.1.0 192.3 10.16.168.3/32 *[OSPF/10] 02:04:12.168.168.0 192.0 10.3 10.4 10.168.168.1.1.1 0x80000006 Summary *10.1.1.1.2 0x80000004 Summary *192.1.1. metric 2 > to 192.1.72.1. metric 0.1.0/30 *[OSPF/10] 01:28:47.1.30.1 0x80000005 Summary *10.0/24 *[OSPF/150] 01:31:02.1.1.1.1.1.72.168.2.4 0x80000004 Extern *192. Chapter 3: Stubbiness 39 10. tag > to 192.1.1 0x80000005 NSSA *0.1 0x80000162 Router 10.3 0x80000011 Summary *10.1.0.0 224.0.1.1 10.1.1.1.1.0.1.2 via ge-0/0/1.1.168.1. tag > to 192.30.1.168. Area 0.168. metric 2 > to 192.1.1 10.2 via ge-0/0/1.1.1 0x80000007 Summary 192.0.0 192.1.3.1.1.2 0x8000015d Network *192.1.71. metric 2.1.168.1.1.2 10.1.1.1.2 via ge-0/0/0.1.2 0x8000000b OSPF database.1 10.1.1 0x8000000e Summary *192. metric 1 > to 192.5/32 *[OSPF/10] 1w3d 06:20:28.168.0 10.1 0x80000005 Summary *192.1.0 10.1.1 Type ID Adv Rtr Seq Router *10.1.0 10.1 0x80000006 ASBRSum 10.71.1.0. metric 4 > to 192. Area 0.4 10.1 0x80000130 Summary *10.1.168.1.1.1. tag > to 192.1.1.168.1.1.0 10.168.1.168. tag > to 192.168.16.16.1 10.1 0x80000004 Extern *192.168.3 0x80000003 OSPF AS SCOPE link-state database Type ID Adv Rtr Seq Extern 192.1.

0 10.168.0 { interface-type p2p.71.1.1.30.4 10.3 10.1.1. will advertise these routes to the outlying Area 2 as external routes.1.1. and that they are inserted into the routing table correctly.2 Summary 192.16.1 Extern 192. } This command forces the backbone R1 to send only a default route to the upstream NSSA R3.1.1.1.3 10.1.1 Seq Age Opt Cksum Len 0x80000007 1884 0x22 0x8f89 48 0x80000007 563 0x22 0x29b3 96 0x80000006 1860 0x22 0xd9bf 60 0x800000b2 961 0x22 0x1758 28 0x800000b1 2345 0x22 0x56b 28 0x80000004 730 0x22 0x6ab0 28 0x800000d6 38 0x22 0xa34d 28 0x80000005 500 0x22 0x467a 28 0x80000007 2796 0x22 0x60b9 28 0x80000004 269 0x22 0x5cbd 28 Seq 0x80000004 0x80000004 0x80000004 0x80000004 Age 2083 1306 1778 1578 Opt 0x22 0x22 0x22 0x22 Cksum Len 0x8791 36 0x7c9b 36 0x8f51 36 0x845b 36 NOTE It’s also easy to switch this network from a NSSA area to a totally stubby network – just add the no-summaries statement to R1 as shown here: [edit protocols ospf Area 0.1 10. 40 Day One: Advanced OSPF in the Enterprise Note that R1 can see both routes advertised by R3 as both external and NSSA routes.168.72.4 Extern *192.0.168. } interface ge-0/0/1.1. This can be seen in output from R4 shown here: root@R4> show ospf database OSPF database.1.2 10.1. type-7.2 Summary 10.1.0 10. but still allows the Area 1 router R3 to be a .1 10.1.168.2.2 Type ID Adv Rtr Router 10.0.0 10.2 ASBRSum 10.168.1.4 Router 192.1. router R2.29.1.1.1.2 Summary 10.2 Router *10.168.168.2 Summary 192.2 OSPF AS SCOPE link-state database Type ID Adv Rtr Extern *192.1. Area 2 will see these routes as external routes since Area 2 is not a stub or NSSA area.2 Summary 10.1.1.1.2 ASBRSum 10.0 10.1.4 Extern 192.1.1.1.1.1.0.168.0 10.1] root@R1# show nssa { default-lsa { default-metric 1.1.1.1. The backbone Area 0.0 10.1.2 192.1.1. } no-summaries.1.1. The reason it shows up in both sections is that it is a network route to Area 1 and a NSSA external route being advertised out.1.0.1.1.2 10.16. Area 0.

Chapter 3: Stubbiness 41 ASBR and send the external RIP routes into the backbone Area 0 and the rest of the network.0.3. you can see that R3 is sending type-3.0.1. link count 3 id 10.1.0. you can see that it is now classified as NSSA. Address: 192.0 Type ID Adv Rtr Seq Summary *10. Bidirectional Age 821 Opt Cksum Len 0x22 0x6cb3 28 744 0x22 0x54c5 28 Age 826 Opt Cksum Len 0x20 0xe21b 60 From the output. – by the way. if the configurations on both ends do not match as NSSA the peering relationship will not happen.2.1 0.0. Area 0.1. Default metric: 1 id 10. let’s check the LSA types from the perspective of R1 and R3.1.1.255.0 Topology default (ID 0) -> Metric: 1 OSPF database. Default metric: 1 id 192.255.1.1.1.0 0.1.1.3 0x80000006 bits 0x2. Mask: 255. Stub NSSA Auth type: None Protection type: None Topology default (ID 0) -> Cost: 0 Step 3 Lastly.0 PtToPt 0.255.3 10.255.0.1. type-4.255.1.1. Area 0.252.0.1. a different verification .252.255. Node ID: 10. data 255. Cost: 1 Adj count: 1 Hello: 10. and type-1 LSA’s. ReXmit: 5. root@R1# run show ospf interface ge-0/0/1.1 Type ID Adv Rtr Seq Router 10. Type PointToPoint (1) Topology count: 0.3 10. Looking at the interface. Default metric: 0 Topology default (ID 0) Type: PointToPoint.168.1.1.0.1 0x80000001 mask 255.0 1 Type: P2P.1 0x80000006 mask 0. this is expected behavior.168.2.255.1.2.3 10.255.2.0.255 Topology default (ID 0) -> Metric: 1 ASBRSum *10. to see the LSA types being used: root@R1# run show ospf database lsa-id 10.1. From R3’s perspective. Dead: 40.0.1. data 192.0 detail Interface State Area DR ID BDR ID Nbrs ge-0/0/1. Type Stub (3) Topology count: 0.1.0.0. MTU: 1500.0. And as stated in the explanation found in Chapter 1.1.168.1 Metric: 1.0. Type Stub (3) Topology count: 0.255. data 255.3 detail OSPF database.1.

1.1. The use of stub areas can also ease troubleshooting of routing issues within networks for remote devices that the network engineer may not have physical access to – and having a single route leaving an OSPF area makes troubleshooting routing issues within those devices much easier.1.1 Summary 192.168.1.1.1.1.1.168.0. routers can be expensive.16.1 10.1 Summary 192.1.2 10.168.71.1. Using OSPF stub areas can substantially decrease the size of a network’s remote area routing tables and linkstate databases inside remote areas.6 10.1.1.1. Area 0.168.1.168.168.18.1.16.1.0.1.0 10.1.1.1 NSSA 10.17.0 10.0 10.1 NSSA *192.168.1 NSSA 0.1 Summary 192.1.0.3 Seq 0x80000003 0x80000006 0x80000002 0x80000001 0x80000002 0x8000000b 0x80000001 0x80000003 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000004 0x80000002 0x80000002 0x80000002 Age 1210 1961 1543 1882 1719 1237 1882 1714 1237 1237 1237 1243 1237 1237 305 428 877 219 Opt 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x28 0x28 Cksum Len 0x9f82 48 0xe21b 60 0x9291 28 0x948e 28 0x8896 28 0x5f60 28 0x675f 28 0xd6e2 28 0xd7db 28 0x7aa 28 0xecc5 28 0x5627 28 0x6711 28 0x5c1b 28 0x140e 36 0x7a0d 36 0x11c7 36 0x6d1 36 And from the bolded output you can see that R3 is receiving NSSA LSA’s from its neighbors.1. Let’s look at the LSA database to see the differences in the LSA’s received: root@R3> show ospf database brief OSPF database.77.1.0 10. or 20 Series.75.1.1 Router *10.1.1 Summary 192.76.3.1.1.3 10.0 10. 42 Day One: Advanced OSPF in the Enterprise approach is taken. .3 Summary 10.1.1.168.1.3 10.1 10.168. For example.1. as this chapter has attempted to illustrate.1.0 10.1 Summary 192.1 Summary 192.1.1.1 Summary 192.1.0 10.0 10.1.1.1.1 Summary 10.0 10. And typically the larger routers with increased memory and faster processors are even more expensive. which allows these areas to be supported with more scalable routers.1.72.1.1 Summary 10. Summary Stubbiness has great benefits for the network engineer. such as the MX 5.1.1.1.4 10.0 10.0. 10.1.1.1.1 Summary 192.1.1.0 10.3 NSSA *192.1.1.168.1 Summary 192.1 Type ID Adv Rtr Router 10.168.

. . . . . . . . . . . . . . . . . . . . . . . . . . 48 Summary . . . . . . . . . . . . . . . . . . . . . . 44 Redistribution Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Dual Default Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 4 Redistribution Types of Redistribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

Day One: Advanced OSPF in the Enterprise

An enterprise network cannot survive with only OSPF to maintain all of its routes. There are many devices that will not support a routing protocol or connectivity to Internet Service Providers via BGP or static routes. In most cases, OSPF will be the protocol of choice for the IGP of enterprises, and these other route types will need to be added into the OSPF database via a redistribution process. There are other situations where OSPF would need to be entered into another routing process and redistribution of OSPF would need to be accomplished. For this to happen you need to redistribute these other processes into OSPF. Redistribution using Junos is accomplished via route policies. These are policies that can match on a protocol, route filter, or route type, as well as on numerous other values that then can be choosen to accept these types for redistribution into another routing protocol. MORE? For more information on Junos route policies see http://www.juniper. net/techpubs/en_US/junos9.6/information-products/topic-collections/ config-guide-policy/frameset.html.

Types of Redistribution
You can use different types of route redistribution, each with benefits and, of course, limitations. The three types of route redistribution are: „ Basic Mutual Redistribution „ Mutual Redistribution „ Hierarchical Redistribution. This section explores the three different types of redistribution, how they are used in various environments, and the benefits and limitations of each.

Basic Mutual Redistribution
As you can see from Figure 4.1, the router in the middle is used as a single device to connect two separate routing domains.

Chapter 4: Redistribution

45

Routed domain 1

Routed domain 2

Figure 4.1

Basic Mutual Redistribution

Basic mutual redistribution means using a single device for this redistribution process. In Figure 4.1 the router in the middle limits control of the process to only the distributing device. The main benefit of a single device is that all filters to prevent routes learned from domain 1, that have been put into domain 2, will not be re-sent to domain 1. This would cause routing loops and prevent communication between routers from taking place. As stated previously, filters are applied to the router in the middle to prevent this. Basic Mutual Redistribution is commonly used when merging the networks of two companies. It is the easiest type of redestribution to maintain because a single device manages the redistribution process. The major downfalls of Basic Mutual Redistribution are scaling and redundancy, as it will only scale as large as the device route table, memory, or bandwidth allows. Also, if the router were to fail, the process would fail with it, and no communication would occur between the two domains.

Multiple Mutual Redistribution
Multiple mutual redistribution is very similar to basic mutual redistribution. The major difference between the two is that multiple mutual distribution scales across multiple routers to connect two or more routed domains. Figure 4.2 shows two routers performing a redistribution process between the two routed domains.

46

Day One: Advanced OSPF in the Enterprise

Routed domain 1

Routed domain 2

Figure 4.2

Multiple Mutual Redistribution

With this technique, scaling is no longer an issue and you can easily connect more routers to scale even larger. The other benefit of multiple mutual distribution is that there is no longer a single point of failure, and redundancy is available. A large drawback of multiple mutual redistribution is that route filtering is now much more complex, and management of the filtering is needed on more devices than it is with basic mutual redistribution.

Hierarchical Redistribution
Hierarchical Resistribution is very different from the previous two redistribution methods, because the idea is to take other routing domains and send them a default from the main routed domain. In fact, Figure 4.3 looks a lot like the OSPF stub areas covered earlier in this book. The main benefit of hierarchical redistribution is that it removes the need for route filtering between routing domains on the redistribution routers, so the complexity is greatly reduced. Redundancy can easily be added, if necessary since there is no requirement for filtering, as there is with the multiple ,mutual redistribution example. The one large downfall of hiereachical redistribution is that there can only be one default gateway within all routed domains, but in cases where enterprises need to merge two diverse networks together with their own independent route tables, hiereachical redistribution would surely suffice.

using a redistribution policy from the RIP protocol used in Chapter 3.3 Diagram of Hierarchical Redistribution Redistribution Design This chapter shows you how to configure a redistribution policy to redistribute a default route. It also examines how these routes are shown in the routing table and in the OSPF database. representing an internet feed. Chapter 4: Redistribution 47 OSPF Domain Default router only Local route tables only Default router only Routed domain 2 Routed domain 3 Figure 4. using the network digram shown in Figure 4.4. .

0/24 R4 Area 2 R3 Area 1 Area 0 R1 R2 Internet Figure 4. R1 and R2.4 Example Network with Redistribution for Chapter 4 The internet feeds will be represented as a default route on both backbone Area 0 routers. by Peter Southwick.net/books. . Many times they will use an EGP (external gateway protocol) like BGP (border gateway protocol) to receive routes from ISPs as a way to provide redundancy for internet connections. They use these connections to support internet connectivity for corporate resources and end users. MORE? To get more information on BGP please see Juniper Enterprise Routing. most enterprise organizations have connections to internet service providers (ISPs). This could easily be a BGP feed from two different service providers.0/24 192. 2nd Edition. Dual Default Route As mentioned previously.juniper.168. and Harry Reynolds. Doug Marshcke. but that is a example for a different book.29.168. at http://www.30. 48 Day One: Advanced OSPF in the Enterprise R5 RIP Network Static Routes 192.

15.1.0.23.0.1. Chapter 4: Redistribution 49 This exercise uses a dual static route scenario to simulate how this scenario would work.15.168.1/30 16.1.15.1.2/30 192.2/30 ge-0/0/1. in addition to.2/32 10.4/32 192.1/30 10.0 lo0.168.1.1/30 192.6 With the static routes in the configuration. * = Both 0. 0 holddown.0 ge-0/0/1.0 fe-0/0/2.1/32 10. 14 routes (14 active.= Last Active.0 ge-0/0/0.168.70.23.23.3/32 10.2.2.2/30 192.0.R3 R2 .0.0 fe-0/0/2.0 192.R2 R1 .0/0 *[Static/5] 00:06:32 .168.70.1.0 lo0.1.168.1/30 To do this you need to add the static routes to the configuration and point them to a new interface within the device using a few configuration steps.0: 14 destinations.3.R4 R1 loopback R2 loopback R3 loopback R4 loopback R5 – R3 R1 .0.0 192.1.0/0 next-hop 16.0 ge-0/0/1.3.0 ge-0/0/0.1.0/0 next-hop 16.15.1.5/30 ge-0/0/0.168.1/30 192.0 lo0.23. .0 lo0. 0 hidden) + = Active Route.1 Link R1 .0 ge-0/0/0.2/30 16.2 Step 2 Router R2 Then configure R2: set routing-options static route 0. Step 1 Router R1 First configure R1: set routing-options static route 0.internet Static Routes Table Interface IP Interface IP ge-0/0/0.0.168.0 192.internet R2 . the route tables should now look like this: lab@R1# run show route inet. providing the resulting OSPF database and routing table. Table 4.168.

1.168.168.0 *[OSPF/150] 00:01:03.23.0 *[Local/0] 3d 23:58:59 Local via ge-0/0/0. The route-filter 0.72.0 *[Direct/0] 3d 23:58:19 > via ge-0/0/0.2 via fe-0/0/2. tag 0 > to 192. metric 1 MultiRecv As shown here. there is now a default route present in the routing table.0 *[Direct/0] 3d 23:59:37 > via lo0.0 *[Local/0] 3d 23:58:58 Reject *[Direct/0] 00:06:32 > via fe-0/0/2.0 *[OSPF/10] 3d 23:59:40.1/32 192. tag 0 > to 192.0/0 exact set policy-options policy-statement redistribution term 1 then accept As shown here. or 0/0.1.3/32 10.0 *[OSPF/10] 00:01:12.168.2 via ge-0/0/1. the statement from protocol static simply means that the statement is matching on the protocol static.168.0. metric 1 > to 192.1.2.2/32 10.1.168.1. In order to do so you need to create a policy to add the external LSA into OSPF. Step 3 Both R1 and R2 Create the following policy: set policy-options policy-statement redistribution term 1 from protocol static set policy-options policy-statement redistribution term 1 from routefilter 0.168.71.168. metric 2.0.2 via ge-0/0/1. route is in the table you need to get this into OSPF.2.23.2 via ge-0/0/0.1.1. metric 2.1.0/0 exact command will match specifically for the default route and not select other static routes that may exist.168.5/32 > to 16.0/30 16.1/32 192.23.2.0 *[Direct/0] 00:01:19 > via ge-0/0/1.15.0 *[Local/0] 3d 23:58:59 Local via ge-0/0/1.1/32 10.0 *[Local/0] 00:06:32 Local via fe-0/0/2.0/24 224.1/32 192.2.0. And the then accept command accepts the configuration into the policy .99/32 16.0 *[OSPF/150] 00:01:03.0 *[OSPF/10] 3d 23:57:29. metric 1 > to 192. Now that the default.2 via ge-0/0/1.0.0/30 192.15.0/24 192.15.2.0.168.1. 50 Day One: Advanced OSPF in the Enterprise 10.10.0.2.0/30 192.168.

0 10.0 10.0 10.168.1.1.juniper.1.1. Step 4 Both R1 and R2 Use the set protocols ospf export redistribution command to force OSPF to export the policy into the OSPF database.0.1.1.1 Extern 192.1 Extern 0.0 10.0.1.4 Extern 192.1 Seq 0x80000001 0x80000001 0x80000003 0x80000002 0x80000003 0x80000002 Age 1006 1037 426 2033 162 2021 Opt 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x9114 36 0x8b19 36 0x8990 36 0x8099 36 0x9150 36 0x8859 36 Issuing the show ospf database external command. From the perspective of outlying Area 1 there is already a default route being advertised.0 10.29.71.1 Extern *0.0. Now let’s check it: lab@R2# run show ospf database external OSPF AS SCOPE link-state database Type ID Adv Rtr Extern 0.1.0/0 routes are shown as external type-5 LSA routes in the LSBD.1 Extern 192.72.1.0. This area is not configured as a stub area and should see the default type-5 LSA in its OSPF database: root@R4> show ospf database external OSPF AS SCOPE link-state database Type ID Adv Rtr Extern 0.1.168. Chapter 4: Redistribution 51 MORE? For more information on route policies within Junos please see: http:// www.72.4 Extern 192.1.0 10. since it is a stub network: .0.168.1.0 10.1. It’s also important to note that the asterisk denotes local origination.6/information-products/ topic-collections/config-guide-policy/frameset. let’s focus on the outlying Area 2.0.2 Extern *192.168. the two 0.168.0.0 10.0 10.net/techpubs/en_US/junos9.1.0.1.30.30.1 Seq 0x80000001 0x80000001 0x80000002 0x80000002 0x80000002 0x80000002 Age 313 344 1948 1342 1528 1328 Opt 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x9114 36 0x8b19 36 0x8b8f 36 0x8099 36 0x934f 36 0x8859 36 The highlighted entry is the external route added via the policy statement for the default route.0.0 10.1. Now these policies need to be applied to OSPF to redistribute the routes into the OSPF database.168.4 Extern *192.2 Extern 192.1. since it also has a default route advertised as a type-5 LSA into the OSPF process.1.168.1.4 Extern 192.1.1.1.html.29.0 10.168. Now that R1 and R2 have the correct entries in the LSDB.1.0 10.0.1.71. One might further note that there is another default route entered into the database from R1 as well.

2 via ge-0/0/1.0.0 .= Last Active.0 10. the RIP routing process from R5 will be redistributed into the OSPF LSDB of Area 1. Step 2 Now use the set protocols ospf export redistribute RIP command to take the policy and put all routes learned through the RIP routing process into the OSPF routing process of the router.70. tag 0 > to 192. Step 1 Again.71.1.0/24 *[RIP/100] 00:56:33. Redistribution of Another IGP One of this book’s OSFP examples from Chapter 3 used a redistribution to place routes learned via RIP into the OSPF database. metric 2.0 10.168.3 NSSA *192. 0 holddown.3 Seq 0x8000007f 0x80000001 0x80000001 Age 658 638 638 Opt 0x20 0x28 0x28 Cksum Len 0x1d89 36 0x13c6 36 0x8d0 36 Every router in the routing domain should now have access to the internet via the default route.1 NSSA *192.0. 0 hidden) + = Active Route. This section provides more details of the procedures involved in that process. . Now let’s cover redistribution of another routing protocol into the OSPF process.1.0 10.168.71. 18 routes (18 active.1 Type ID Adv Rtr NSSA 0.168.2 inet. here is the LSDB after application of the RIP redistribution policy: root@R3# run show route receive-protocol rip 192.168.1.0.168. which states that the source protocol is RIP instead of static. Let’s use the following policy: set policy-options policy-statement redistribute-rip term 1 from protocol rip set policy-options policy-statement redistribute-rip term 1 then accept The only difference between this example of redistribution and the one shown in the previous section is the from protocol rip option.70. Area 0.72.1.0. this is done through a policy statement that is applied to the OSPF process. 52 Day One: Advanced OSPF in the Enterprise root@R3> show ospf database nssa OSPF database. * = Both 192.1. Once complete. To redistribute another IGP.0: 18 destinations.1.

1 192.1.168.30.168.1.1 Summary 10.2.2 Extern 192.2 via ge-0/0/1.1.168.1.0/0 Ext2 Network IP 10.3 Seq 0x80000003 0x80000005 0x8000007a 0x80000079 0x80000002 0x80000091 0x80000003 0x80000002 0x80000080 0x80000002 0x80000002 Age 1643 2013 2205 2393 707 332 894 519 2018 1397 592 Opt 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x28 0x28 Cksum Len 0x9f82 48 0xe41a 60 0xa10a 28 0xa307 28 0x8896 28 0x52e6 28 0x6361 28 0xd8e1 28 0x1b8a 36 0x11c7 36 0x6d1 36 As shown here.1 Extern 192.1.1.168.1.1.72.1.1.168.1.1.168.3.1.0.0 10.1.168.0.3 10.1 Summary 192.0.1.168.1.1.1 NSSA 0.0 10.0. They are NSSA routes since the router is configured as an NSSA stub router.168.1. Routers R1 and R2 will see the advertisements from R3 as follows: lab@R2# run show ospf database external OSPF AS SCOPE link-state database Type ID Adv Rtr Extern 0.1 Summary 192.16.1 Intra Area/AS BR IP 10.1.168.1.168.1.0 1 ge-0/0/0.1.0 0 lo0.0 1 ge-0/0/0.1.1.4 10.1 192.3 Inter AS BR IP 10.1 10.1 Summary 10.1.1.168.1 Router *10.168.0.0. Area 0.72.1.1 Type ID Adv Rtr Router 10.1 Seq 0x80000006 0x80000006 0x80000004 0x80000004 0x80000003 0x80000003 Age 444 2925 975 197 1944 1757 Opt 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x8719 36 0x811e 36 0x8791 36 0x7c9b 36 0x9150 36 0x865a 36 The routes from RIP advertised by OSPF Area 1 appear in R2’s link-state database as external.0 10.0 0 ge-0/0/0.1.0/30 Intra Network IP 192.1.1.1.0 10.1 .0/24 *[RIP/100] 00:56:33.0 10.1. Chapter 4: Redistribution 53 192.0 1 ge-0/0/1.168.0 2 ge-0/0/0.3.3.4 Intra AS BR IP 192. the RIP routes are now in the OSPF LSDB.3 Summary 10.2/32 Intra Network IP 10.168.72.1.0.1.70.0 1 ge-0/0/1.1.1.168.168.1.4 Extern 192.1.1.168.1.1.168.2 192.1 Extern *0.1.0 10. tag 0 > to 192.1 192.0 2 ge-0/0/0.2 192.0 10.0/30 Inter Network IP Metric NextHop Interface 1 ge-0/0/0.0 2 ge-0/0/1.71. as shown here: lab@R2# run show ospf route Topology default Route Table: Prefix Path Route NH Type Type Type 10.1.168.0 10.1.3. metric 2.1.1.1/32 Intra Network IP 10.168.1.1.71.1 NSSA *192.1.1.1.1.4/32 Intra Network IP 192. They will be placed into the routing table accordingly.1.1.1.168.0 10.1.168.16.1 192.1.1.1 192.2 192.0 10.1 10.0.0 And these are the LSA’s that will be advertised into the OSPF process: root@R3# run show ospf database OSPF database.3 NSSA *192.1.0 2 ge-0/0/0.1.29.1.0.4 Extern 192.1.0 10.0.0 10.2 Intra Router IP 0.1.1.1 Summary 192.0 Nexthop Address/LSP 192.3/32 Inter Network IP 10.2 10.1.1.

3.168.3.168. There will always be a need for it. this chapter will reaffirm to the reader that redistribution of routes is necessary to best practice networking.2 192.2 192. and making sure that the routes are inserted into the OSPF process correctly just helps keep the network running optimally.0/24 192.0 2 ge-0/0/1. Now let’s get a little more complex in Chapter 5 with multiple domains.168.0 2 ge-0/0/0.3.168. 54 Day One: Advanced OSPF in the Enterprise 192.2 192.168.2 192.0/24 Intra Inter Intra Intra Intra Ext2 Ext2 Ext2 Ext2 Network Discard Network Network Network Network Network Network Network IP IP IP IP IP IP IP IP IP 1 ge-0/0/1.0/30 192.16.0/24 192.168.71.16.168.1 192.1.0 0 ge-0/0/1.0/30 192.3. .168.0/23 192.3.168.0 0 ge-0/0/1.168.1 Summary Hopefully.30.18.0 192.168.168.1.168.72.0 16777215 2 ge-0/0/1.0/24 192.0 3 ge-0/0/1.17.168.168.0/24 192.0/21 192.0 2 ge-0/0/0.29.2 192.3.168.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 . . . . . . . 56 Summary .Chapter 5 Multiple Homogeneous Domains Subject Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

And.0 ge-0/0/0.2/30 192. This chapter shows you how to deploy multiple homogeneous OSPF domains using Junos routers and switches.0 lo0.1.0 192.1.0 fe-0/0/2.0 ge-0/0/1.0 lo0. The IP address list is captured in Table 5.2/30 192. They are useful because different routing domains can be assigned to different regions while still keeping the same routing protocol.2/32 10.1.70.168.168.1/30 .3.0 ge-0/0/1.0 192.168. NOTE In reality.1. Subject Network This chapter uses the network topology shown in Figure 5.1.1/30 192. Routers R6 and R7 are additions to the network created in Chapter 4.0 lo0.2/30 ge-0/0/1.23. this type of deployment should be avoided whenever possible and should be used only by very large entities. it shows you how to verify that the routing tables and OSPF database are receiving the correct entries.3.R2 R1 . The connection between these two domains will be on R6 and R1.internet The IP Address List for the Network Example in Chapter 5 Interface IP Interface IP ge-0/0/0.R3 R2 .0 ge-0/0/0.15.0 lo0. which also provides the ability to keep several backbone areas within the network to regionalize all of the OSPF network.70. as with all the chapters in this book.3/32 10.1.4/32 192.1.1.168.1/30 ge-0/0/0.0 192. Table 5.1 Link R1 .168.168. The processor utilization of OSPF is used for all separate instances.2.1. The additions represent a different OSPF domain that consists of a separate OSPF Area 0 and Area 1.2.1/32 10.168. 56 Day One: Advanced OSPF in the Enterprise Multiple homogeneous domains within OSPF are sometimes referred to as different OSPF processes.168.1. or as a temporary solution for an integration.2/30 16.R4 R1 loopback R2 loopback R3 loopback R4 loopback R5 – R3 R1 .1/30 10.0 ge-0/0/0. which is often required when integrating the network of one company into that of another.1.1.1/30 192.

168.0 192.5/30 10.15.168.1.168.1.29.0 ge-0/0/0.168.7/32 fe-0/0/3.5/30 192.1.23.6/32 10.80.1.80.6/30 R5 RIP Network Static Routes 192. Chapter 5: Multiple Homogeneous Domains 57 R2 .0 ge-0/0/1.0 lo0.0 ge-0/0/0.80.0 16.168.internet R6 – R1 R6 – R7 R6 loopback R7 loopback fe-0/0/2.1/24 192.30.1 Network Example with Multiple Domains .1/30 192.168.2/30 192.80.0 lo0.1/24 R4 Area 2 R3 Area 1 Area 0 R2 R2 R1 Domain 1 Domain 2 Area 1 R7 R6 Area 0 Figure 5.

interface lo0.0.1 { interface ge-0/0/1.21.168.0 172.168.1.0 224. two host routes to the R7 have been advertised to R6 to show network connectivity for the OSPF network being added.4/30 *[Direct/0] 00:59:46 > via ge-0/0/1.168.0.0: 8 destinations. 58 Day One: Advanced OSPF in the Enterprise The OSPF configurations for R6 and R7 are listed below: [edit protocols] root@R6# show ospf { Area 0.80. metric 2 > to 192.2/32 *[Local/0] 01:25:08 Local via ge-0/0/0.80.6/32 *[Direct/0] 00:45:27 > via lo0. There are two areas with an Area 0 backbone. } } And for R7: [edit protocols] root@R6# show ospf { Area 0. For this demonstration.1/32 *[OSPF/10] 00:40:09. metric 2 > to 192.0 { interface ge-0/0/0.0. 8 routes (8 active.6 via ge-0/0/1.168. } } Area 0.22.0. passive.0 192.0/30 *[Direct/0] 01:25:05 > via ge-0/0/0.0.19.0 192.80.0.1/32 *[OSPF/10] 00:40:09.0 192.1 { interface fe-0/0/0. R6 has the following routing table: root@R6# run show route inet.0.0. .0.5/32 *[Local/0] 01:25:08 Local via ge-0/0/1.6 via ge-0/0/1. metric 1 .168. 0 holddown.0. } } } As you can see.80.= Last Active.1.0 { passive.0.5/32 *[OSPF/10] 01:25:30. 0 hidden) + = Active Route.0 172.19.0 192.80. * = Both 10.0.80. interface lo0. the configuration for OSPF in this domain is very familiar and basic.168.

Most of the significant configuration will reside on this device and the Junos OS will create a new routing instance that houses the new domains in OSPF backbone Area 0.1/32 are both shown in the routing table as learned from OSPF. MORE? A good book on routing instances and how they function can be found in Juniper Networks Reference Guide. by Thomas M Thomas.19.0. Let’s follow the configuration steps of this routing instance.16/32 *[Direct/0] 01:25:30 > via lo0. inet. which is under the [routing-instances] hierarchy. This is where you can create different virtual routing tables of many types. 4 routes (2 active.0. These are the routes that were added from R7 that have been sent via LSA’s to R6. (Addison-Wesley Publishing Company.19. et. .= Last Active.0 command piece specifies an interface in the virtual-router.22. In this case. and virtual routers.0.1/32 and 172.21.0. Step 1 First create the routing instance: set routing-instances domain2 interface fe-0/0/3.0: 4 destinations. and in this example this device will be R1. 0 holddown. Configuration of Router R1 With multiple OSPF domains.0 set routing-instances domain2 protocols ospf area 0. including MPLS. Step 1 The rest of the configuration looks the same as any of the other OSPF configurations seen in previous chapters: . it is a virtual router (the default configuration) that will house the connection to the other OSPF domain. VPLS.0. one device is needed to connect the domains. al. * = Both 10.0 interface fe-0/0/3.16385 10.0. The interface fe-0/0/3. 2 hidden) + = Active Route.16385 The routes 172.0 Items to note in this configuration are a new configuration stanza.1/32 *[Direct/0] 01:25:30 > via lo0. virtual bridges.. Chapter 5: Multiple Homogeneous Domains 59 MultiRecv __juniper_private1__. 2002).

the command to see if there is an OSPF neighbor is: lab@R1# run show ospf neighbor instance domain2 Address Interface State 192. Step 2 This step will be a bit different than before in R1.1.0.0 [OSPF/150] 2w5d 06:14:54. metric 1 > to 192. Step 3 The routing table will look very different than it has before. 0 hidden) + = Active Route.23.15. * = Both 0.2 fe-0/0/3.1/32 *[Direct/0] 3w2d 07:01:07 > via lo0. Since a separate routing instance is being used for this domain.0 10.1.1.168.0 10.1.1. metric 0.= Last Active.1.0 Full ID 10.6 Pri 128 Dead 37 You can see from the above output that there is an OSPF adjacency to R6 and the state is full.2/32 *[OSPF/10] 3w2d 06:58:59.0.80.0 . since there will be a new routing table representing our new routing instances: lab@R1# run show route inet. 16 routes (15 active.2 via ge-0/0/0.1.0.15. metric 2 > to 192.0 { interface fe-0/0/3.23. 60 Day One: Advanced OSPF in the Enterprise [edit routing-instances] lab@R1# show domain2 { interface fe-0/0/3.1.0/0 *[Static/5] 2w5d 07:08:02 > to 16. .0/30 *[Direct/0] 2w5d 07:08:02 > via fe-0/0/2.2 via ge-0/0/0.0.0: 15 destinations.0.168.4/32 *[OSPF/10] 00:10:52.2 via fe-0/0/2. it’s necessary to see if the OSPF adjacency is up. protocols { ospf { Area 0.10.0. 0 holddown.99/32 *[Local/0] 3w2d 07:00:28 Reject 16. tag 0 > to 192.168. } } } } After this configuration.168.1.0 10.0 10.1.2 via ge-0/0/0.1.2.

1. .0 192. metric 0.0 224.168.15. metric 3 > to 192.19.168.168.1/32 *[Local/0] 00:31:52 Local via fe-0/0/3.2 via fe-0/0/3.0.168. 0 holddown.2 via fe-0/0/3.0 192. tag 0 > to 192.22.0: 17 destinations.168.168. 18 routes (17 active.80.0. metric 0.1/32 *[Local/0] 3w2d 07:00:29 Reject 192. metric 2 > to 192.1/32 *[OSPF/10] 00:31:42.168.0 172.6 via fe-0/0/2. 0 hidden) + = Active Route.5/32 *[OSPF/10] 3w2d 07:01:10.168.0 172.80.30.2 via fe-0/0/3.2 via ge-0/0/0.1.inet.168.0: 7 destinations.168.1.16.0/21 *[OSPF/10] 00:10:52.0/24 *[OSPF/150] 00:10:52.1. 0 holddown.0/30 *[Direct/0] 00:31:52 > via fe-0/0/3.168. * = Both 10.= Last Active. Chapter 5: Multiple Homogeneous Domains 61 16. but can you communicate to them from other routers in the network? Step 4 Let’s see if the routes have been put into the routing table: lab@R2# run show route inet.1.0 192.0 192.0 224.0/24 *[OSPF/150] 00:10:52.1/32 *[Local/0] 2w5d 07:08:02 Local via fe-0/0/2.23.0.29. metric 0.0/30 *[OSPF/10] 00:11:02.168. tag 0 .23. .168.1/32 *[Local/0] 3w2d 07:00:29 Local via ge-0/0/0. tag 0 > to 192.168.0.inet. metric 1 MultiRecv domain2. metric 1 MultiRecv As shown here.0 192.80. there is a new routing table called domain2.80.2 via fe-0/0/3.80.1.2 via ge-0/0/0.2.168.0. 0 hidden) + = Active Route.2 via ge-0/0/0.1.1.0 that contains the routes of the new OSPF domain. metric 3 > to 192.80.21. You can see the two host routes. metric 2 > to 192.0 192.0 192.0.0/30 *[Direct/0] 3w2d 06:59:49 > via ge-0/0/0.0 192.6/32 *[OSPF/10] 00:31:42. metric 1 > to 192. 7 routes (7 active.0 192.3.168.2 via ge-0/0/0.168. * = Both 0.= Last Active.0/0 *[Static/5] 2w5d 07:13:00 > to 16.1/32 *[OSPF/10] 00:31:42. metric 4 > to 192.19.80.15.0 [OSPF/150] 2w5d 06:19:49.4/30 *[OSPF/10] 00:31:42.168.5/32 *[OSPF/10] 00:31:52.

1.3.0 *[Direct/0] 3w2d 07:05:16 > via ge-0/0/0.1.0/24 192.1.168.1/32 192.2 via ge-0/0/1.0 *[OSPF/10] 3w2d 07:06:14.0 *[OSPF/10] 00:16:26.16. tag 0 > to 192.0 *[OSPF/150] 00:16:26.5/32 > to 192.15.168.22.2 via ge-0/0/1.168. The goal is to get both domains to communicate with each other.1.2/32 192.3. 62 Day One: Advanced OSPF in the Enterprise 10.168.1.0 *[Local/0] 3w2d 07:05:21 Local via ge-0/0/1.21.3. metric 2 > to 192.3.0/24 224.4/32 16.168.1 via ge-0/0/0.19.29.0/30 192.168.0 *[Direct/0] 00:16:37 > via ge-0/0/1.30.2/32 10.5/32 192.3. metric 0.168. metric 0.0 *[Direct/0] 2w5d 07:13:00 > via fe-0/0/2.1.168. so let’s move to the next section to find out how.0 *[OSPF/10] 00:16:26.0 *[OSPF/10] 00:16:26.0/24 192.1.0 *[Local/0] 2w5d 07:13:00 Local via fe-0/0/2. so any communication to those network routes will end up using the 0/0 route.23. metric 1 > to 192.4/30 16.0 *[OSPF/150] 00:16:26.1/32 10.0/21 192. To accomplish this it’s necessary to utilize a ribgroup.17.168.0/30 192. which gives the user the ability to have a routing protocol place information in multiple routing tables.0 *[Local/0] 3w2d 07:05:21 Local via ge-0/0/0. of course.3. metric 3 > to 192. metric 2 > to 192.16.0.3.1 and 172.168. metric 16777215 Discard *[OSPF/10] 00:16:26.168.168. metric 1 MultiRecv And the routes to 172. Communication from One OSPF Domain to the Other Having two separate routing tables and two separate OSPF domains is nice if you are a service provider and want this type of separation.168.2 via ge-0/0/1. metric 1 > to 192.168.0 *[Direct/0] 3w2d 07:06:13 > via lo0.168.15.168.2 via ge-0/0/1. but within an enterprise network communication between the two domains is usually necessary.23.1 via ge-0/0/0.18.0 *[OSPF/10] 3w2d 07:04:26.1.0. . tag 0 > to 192.19.0/30 192. which is not what you want.168.2 via ge-0/0/1.0 *[OSPF/10] 00:16:26.0/23 192.2 via ge-0/0/1.1 are not present.3.168.1.1.

0 sharing2 import-rib inet.0 ]. inet. juniper. There are two separate groups created.html.15. Now that the rib-groups are created the next step is to apply them to the OSPF processes.inet.0. For more information on rib-groups see: http://www.23. Chapter 5: Multiple Homogeneous Domains 63 In our case. but it has been known to confuse network engineers. } rib-groups { sharing { import-rib [ inet.0.0. } sharing2 { import-rib [ domain2.0 inet.0 It’s important to note that a grouping is being created between two separate routing tables in this configuration. .inet.0. Step 2 Router R1’s routing options configuration now looks like this: lab@R1# show static { route 0.inet. Step 1 First let’s configure R1: set set set set routing-options routing-options routing-options routing-options rib-groups rib-groups rib-groups rib-groups sharing import-rib inet.0 domain2.inet.1. but they are beyond the scope of this book. which is the new domain recently created. and domain2.inet.0/0 next-hop 16. rib-groups share the routing tables between two domains.inet.2.0 ].1. MORE? There are options to filter out certain types of routes using routing policies associated with rib-groups.0 places information into domain2.html?topic-32752. } } router-id 10. The configuration for this is not very complex. In the simplest terms.3/information-products/topiccollections/config-guide-routing/index. one for each domain of OSPF. which is the existing OSPF domain from our previous chapters.0 and vice versa. In this case it’s the inet.0 sharing2 import-rib domain2. both of which are important.net/techpubs/en_US/junos11.0 sharing import-rib domain2.1.

0 { interface fe-0/0/3. Area 0. the rib-groups will need to be applied to each one.0.0. Area 0.0 { interface ge-0/0/0. 64 Day One: Advanced OSPF in the Enterprise Step 3 Since R1 has two separate OSPF domains.0. } interface lo0. } interface ge-0/0/1. And the total OSPF configuration for both routers now looks like this: [edit protocols ospf] lab@R1# show rib-group sharing.1 { nssa { default-lsa { default-metric 1.0. } } Area 0.0 { passive.0 { priority 255. } } [edit routing-instances] lab@R1# show domain2 { interface fe-0/0/3. type-7. } } } } .0.0. export redistribution. protocols { ospf { rib-group sharing2. which is done like this: set protocols ospf rib-group sharing set routing-instances domain2 protocols ospf rib-group sharing2 This configuration allows sharing of the routing tables between both OSPF domains. } summaries.0.0 { interface-type p2p.0.

80.1.1. tag 0 > to 192. As stated before.0 10. but that’s not required to accomplish a separate domain OSPF network.168.0: 14 destinations.0 10.2 via ge-0/0/0.1.0/21 *[OSPF/10] 00:41:04.21.22. .0 192.1.16. metric 4 > to 192.80.2 via fe-0/0/3.4/30 *[OSPF/10] 00:36:24.80.= Last Active.1.30.2/32 *[OSPF/10] 00:41:04.0 192. metric 2 > to 192. metric 2 > to 192. metric 0.168. Step 1 First you need to verify that both tables are seeing the same routes on R1: lab@R1# run show route protocol ospf inet. * = Both 0. Verification of Functionality With the configuration completed. 20 routes (19 active.2 via ge-0/0/0.1.6/32 *[OSPF/10] 00:36:24.168.0 172.168. tag 0 > to 192.0 192.80.168. metric 0.2 via ge-0/0/0. metric 1 > to 192.168.1. metric 3 > to 192. tag 0 > to 192.0/24 *[OSPF/150] 00:41:04.3. 0 holddown.1.168.2 via ge-0/0/0.1.168.2 via fe-0/0/3. 0 holddown. 0 hidden) + = Active Route.2 via ge-0/0/0.2/32 *[OSPF/10] 00:41:04. metric 1 . Chapter 5: Multiple Homogeneous Domains 65 This’s all that is required to create two separate OSPF domains and allow them to communicate.0 10.0/0 *[OSPF/150] 00:41:04.1.0.1/32 *[OSPF/10] 00:36:24. .2 via ge-0/0/0.0/30 *[OSPF/10] 00:41:04.5/32 *[OSPF/10] 3w2d 08:09:53.1/32 *[OSPF/10] 00:36:24.80.1.0 192.168.168.0. 0 hidden) + = Active Route.0 10.1.0.168.0 224. metric 0.1.= Last Active. tag 0 > to 192. 14 routes (14 active.1.0. metric 0.168.0 192.4/32 *[OSPF/10] 00:41:04.2 via fe-0/0/3.1.29. metric 2 > to 192.1. metric 1 > to 192.0/0 [OSPF/150] 00:41:04.19.0 172.168.0. metric 3 > to 192.168.2 via ge-0/0/0.168.2 via ge-0/0/0.2 via fe-0/0/3.0/24 *[OSPF/150] 00:41:04.0: 19 destinations.168.inet. the next task is to verify that both routing tables are complete with all routes and that the OSPF database is seeing the correct information.0. metric 1 MultiRecv domain2. some enterprise networks may want to filter routes between domains.168.19. * = Both 0.

168.168.3.3.19.1.4/30 224. 0 holddown.0.168.168. metric 0.168.168. tag 0 .2 via ge-0/0/0.168. metric 1 > to 192.0 10.= Last Active.168.1.0 *[OSPF/10] 00:36:24.168.168.0 *[OSPF/10] 00:36:24.1.168.0: 21 destinations.1.0 192.0/24 *[OSPF/10] 00:30:11.2 via ge-0/0/0. metric 2 > to 192.168.22.168.2 via ge-0/0/1. metric 0.1 via ge-0/0/0.0 10.0/24 *[OSPF/150] 00:30:11. tag 0 > to 192.0/21 *[OSPF/10] 00:30:11.2 via ge-0/0/1.168.0/0 [OSPF/150] 00:20:56.2 via fe-0/0/3.1.1.1.2 via ge-0/0/1.2 via ge-0/0/0. tag 0 > to 192.0/24 *[OSPF/150] 00:20:56.1.2 via ge-0/0/0.17.0 *[OSPF/10] 00:41:04.1/32 *[OSPF/10] 00:20:56.3.4/32 *[OSPF/10] 00:30:11. * = Both 0. metric 1 > to 192.2 via ge-0/0/0.18.2 via ge-0/0/0. metric 2 > to 192.0/30 192.1.2.6/32 172.1.0 *[OSPF/150] 00:41:04.30.0/30 *[OSPF/10] 00:20:56.1 via ge-0/0/0. metric 2 > to 192.3.1.2 via fe-0/0/3. metric 1 MultiRecv You can see that both tables have the same destinations.168. metric 2.168.0 *[OSPF/10] 00:41:04.0 *[OSPF/150] 00:41:04. 0 hidden) + = Active Route.0 *[OSPF/10] 00:41:04.1.0 *[OSPF/10] 00:36:24. metric 2 > to 192.0/21 192.168.168.0 192.3.168.168. metric 2 > to 192.1. metric 3 > to 192. metric 0.1.168. 66 Day One: Advanced OSPF in the Enterprise 10.1. tag 0 > to 192.80. Now let’s take a look at R2.1 via ge-0/0/0. metric 1 > to 192.168.0 192.5/32 > to 192.0 192.1. tag 0 > to 192.0/24 192.4/32 10.80.0 *[OSPF/10] 00:36:24.0.0/23 *[OSPF/10] 00:30:11.2 via ge-0/0/1.2 via fe-0/0/3.1. metric 3 > to 192. .0 192. metric 0.71. metric 3 > to 192.0/24 *[OSPF/150] 00:30:11.19.1/32 172.0/24 192.168.0 192.80.16. metric 16777215 Discard 192.2 via ge-0/0/1.80. metric 4 > to 192.2 via fe-0/0/3.168. metric 2 > to 192.80.0/30 *[OSPF/10] 00:30:11.29.1.0.16.2 via ge-0/0/1.168.168.1 via ge-0/0/0.29.3/32 *[OSPF/10] 00:20:56.1.3. and the routing table there: lab@R2# run show route protocol ospf inet.1/32 192.30.1.168.21.168.168.0 *[OSPF/10] 01:40:35.168. metric 0. tag 0 > to 192.16.168. 22 routes (21 active. metric 2 > to 192.3.0.168.0 192.168.0 10.

0 10.168.1.1.1.1 ASBRSum 10.1.1.1.168.1.1.3 Summary *10.1.0 10.1.3 10. therefore they will not be advertised to other routers.72.1.0.71.1.1.1. The same can be said for the OSPF domain 2.1.168.1 Seq 0x800002bd 0x800002bd 0x800002aa 0x80000002 0x80000002 0x80000003 0x80000005 0x80000002 0x80000006 0x8000000c Seq 0x80000005 0x8000000a 0x80000002 0x80000001 0x80000001 0x80000008 0x80000001 0x80000001 0x80000003 0x80000002 0x80000001 Seq 0x80000234 0x80000003 0x80000002 0x80000002 0x80000002 0x80000002 Age 229 84 3 481 727 833 1156 513 862 1376 Age 229 1427 1009 1373 1373 229 1373 1373 1383 522 2004 Age 123 298 749 142 362 242 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Opt 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x28 0x28 Opt 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0xb8aa 48 0xcc92 48 0x3fa 32 0x6ab4 28 0x5ac2 28 0x467e 28 0x318f 28 0xaa0e 28 0x54c5 28 0x38d9 28 Cksum Len 0x9b84 48 0xda1f 60 0x9291 28 0x948e 28 0x8a95 28 0x655d 28 0x675f 28 0xdae0 28 0x160d 36 0x11c7 36 0x8d0 36 Cksum Len 0x254b 36 0x871b 36 0x8b8f 36 0x8099 36 0x934f 36 0x8859 36 The routes are not present in the OSPF database for R1.0/24 224.0 10.0.1.1.1.2 Summary 192.16.0. metric 1 MultiRecv What is missing are the host routes learned from R7.1 Summary 192.1.1.1.1.0 10.4 Extern *192.1.0 10.1 Summary 10.1 via ge-0/0/0.0.1.1 Summary *192.1.2 ASBRSum *10.0.1.1. .1.0 *[OSPF/150] 00:20:56.4 10.1.1.0 10.0 10.1.1.1.1.1 Router 10. Chapter 5: Multiple Homogeneous Domains 67 192.168. tag 0 > to 192.4 10.1 10.1.3 NSSA 192.1 Extern *192. a policy needs to be created to advertise these routes to the other routers within the OSPF domain.0 10.1.1.1 Router 10.2 Extern 192.1 Extern 0.0 Type ID Adv Rtr Router *10.0 10.0.1 Type ID Adv Rtr Router *10.1.1.1.1.3. metric 2.168.168.1.0.1.1.1 Summary *192.0 10.168.1.1.1.1.1.1 via ge-0/0/0.1.0 route table of R1: root@R1# run show ospf database OSPF database.168.72.1.168.1.1.3 10.1.168.1. The reason for this is seen in the OSPF database.1.0 10.0.1.2 OSPF database.0 10.1.29.168.1.1. The reason for this is simply because they are considered completely external to the OSPF process of the original OSPF domain.1.2 10.1 10.71.1.1.1 10.1 NSSA 192.1.3 10.1.72. Area 0.1 10.2 Network *192.1.1.3.1.0 10.1 NSSA *0.0 *[OSPF/10] 3w2d 11:40:48.168.168.1.1.4 Extern 192.0.30. With that said.1.1.5/32 > to 192.1 Summary *10. Area 0.1.2 10.1.2.1.0 10.1 Summary *10.3 OSPF AS SCOPE link state database Type ID Adv Rtr Extern *0.2 Summary *192.1 Summary *192.168.0.1.1. for the inet.0.1.168.4 10.0.0 10.1.16.1.1 Summary *10.168.

} } area 0. The next step is to apply configuration to the OSPF process.1 { nssa { default-lsa { default-metric 1.0 { interface ge-0/0/0.0.0. 68 Day One: Advanced OSPF in the Enterprise Such a policy for exporting the routes learned from OSPF domain 2 is as follows: set policy-options policy-statement from_domain2 term 1 from instance domain2 set policy-options policy-statement from_domain2 term 1 then tag 10 set policy-options policy-statement from_domain2 term 1 then accept This configuration takes the routes from the routing table domain2 and sets the external tag to 10 (this can be whatever you want it to be). Step 4 To apply the configuration to the OSPF process. } } [edit routing-instances] root@R1# show domain2 { . then accepts it. type-7.0 { priority 255. use: set protocols ospf export from_domain2 In total the configuration for OSPF and the associated policies is as follows: root@R1# show rib-group sharing.0.0.0 { interface-type p2p.0 { passive. } interface ge-0/0/1. } interface lo0.0 { disable. area 0. } summaries. } interface fe-0/0/7. export [ redistribution from_domain2 ].

1.1. metric 1.1.1.1/32 *[OSPF/150] 00:09:49. tag 10 > to 192.0. metric 1 > to 192.0/0 [OSPF/150] 00:43:57.19. accept.4/32 *[OSPF/10] 00:53:12.1.1.1. } } } } [edit policy-options] root@R1# show policy-statement from_domain1 { term 1 { from protocol ospf.168. metric 3. 0 holddown.1.19.0 172.21. tag 0 > to 192. tag 10 > to 192. metric 2 > to 192. 0 hidden) + = Active Route.1.0. metric 0.168.1 via ge-0/0/0.168.6/32 *[OSPF/150] 00:09:49.168.2 via ge-0/0/1. } } } policy-statement from_domain2 { term 1 { from instance domain2. Chapter 5: Multiple Homogeneous Domains 69 interface fe-0/0/3.0: 25 destinations.= Last Active.0.1 via ge-0/0/0.0 10.0 { interface fe-0/0/3.3/32 *[OSPF/10] 00:43:57.0 172.0.1. area 0.0 10.3. Router R2 should have the complete route table. export from_domain1.0. accept.1 via ge-0/0/0. Let’s see: lab@R2# run show route protocol ospf inet. metric 1 > to 192. * = Both 0. then { tag 11.0.1 via ge-0/0/0. } } } Now that the policy has been applied to the OSPF processes.1/32 *[OSPF/10] 00:43:57.1 via ge-0/0/0.1.168.0 10. . 26 routes (25 active.1.168.1. tag 10 . metric 3.22.1/32 *[OSPF/150] 00:09:49. then { tag 10.0 10. protocols { ospf { rib-group sharing2.

3 10.1.5/32 > to 192.168.1.168.0 *[OSPF/10] 00:43:57.1 10. tag 10 > to 192.1.0 *[OSPF/10] 3w2d 12:03:49.2 Network 192.2.1.168.1 via ge-0/0/0.1.0.1.3.0/24 192.80.1 Extern 172.1 Extern 192.1.29.1.0.0.1.4 10.3 10.3.1.1 Extern *0.1.22. metric 0. Area 0.4 10.2 Summary *192.1. tag 0 > to 192.1 via ge-0/0/0.1.1.168.3.1.168.1.18.0.6 10.168.0 *[OSPF/10] 00:53:12.168.2 Extern 10.1.21.0 *[OSPF/150] 00:53:12.2 via ge-0/0/1.1.30.19.0 Type ID Adv Rtr Router 10.1. metric 0.1.1.1.2.1. metric 2 > to 192. metric 2.16.168.2 Summary 192.1.1.71.1.0/24 192.4/30 224.17.2 via ge-0/0/1.0 *[OSPF/150] 00:43:57.168.16.1 Extern 192.168.168.1.1.0/30 192. metric 3 > to 192.168.1 ASBRSum *10.168.168.2 via ge-0/0/1.1 via ge-0/0/0.3.1 10.16.0 10.168.168.0. 70 Day One: Advanced OSPF in the Enterprise 192.1 Summary *192.0/24 192.1.1 via ge-0/0/0.2 via ge-0/0/1.168.168.168.72.1.1.0 *[OSPF/10] 00:53:12.2 10. metric 2 > to 192.1.1.1.19.1 Extern 172.1.0/21 192.0/24 192. metric 2 > to 192.2 ASBRSum 10.1.1.1. and the OSPF database is showing them correctly as external routes.1. metric 2.1.0 *[OSPF/10] 00:53:12.29.1 10.0 10.1.1.0 *[OSPF/150] 00:53:12.4 Extern 192. metric 16777215 Discard *[OSPF/10] 00:53:12.1.2 via ge-0/0/1.3.2 OSPF AS SCOPE link state database Type ID Adv Rtr Extern 0.1 10.0.1 Seq 0x800002be 0x800002bd 0x800002aa 0x80000003 0x80000002 0x80000004 0x80000005 0x80000002 0x80000007 0x8000000c Seq 0x80000234 0x80000003 0x80000001 0x80000001 0x80000001 0x80000002 0x80000002 0x80000003 0x80000002 0x80000001 Age 632 1384 1305 137 2027 262 2456 1813 395 2677 Age 1425 1600 633 633 633 2050 1443 13 1545 633 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0xb6ab 48 0xcc92 48 0x3fa 32 0x68b5 28 0x5ac2 28 0x447f 28 0x318f 28 0xaa0e 28 0x52c6 28 0x38d9 28 Cksum Len 0x254b 36 0x871b 36 0x7a0e 36 0xc8f9 36 0xbd04 36 0x8b8f 36 0x8099 36 0x9150 36 0x8859 36 0xfae3 36 .168.1 Router *10.1.1.0.168. tag 0 > to 192.0 *[OSPF/150] 00:43:57.1.0 10.30.0 *[OSPF/150] 00:09:49.1 via ge-0/0/0.1.0/23 192.71.72.4 Extern 192.1 Extern 192.4 10. metric 1 MultiRecv The routes from R7 are indeed in place in the table. tag 0 > to 192. lab@R2# run show ospf database area 0 OSPF database.0 10.3.168. tag 0 > to 192.1.1. metric 2.1 Summary *10.0 10.0 10.1.1.0/30 192.168.1.1.168.1.0/24 192.168.1.168.168.1 Summary 10.1.1.0 10.1.1.168.168.1.0 10.0 10.0.80.

19. as expected.168. metric 0. metric 2.168. * = Both 0. Area 0. metric 2 > to 192.168. this means that the routes will appear in the OSPF database as external.168. tag 11 > to 192.0/21 *[OSPF/150] 00:34:54.6 Summary *172.0.80.1 10. metric 1.19.22.1 via ge-0/0/0.5/32 *[OSPF/10] 00:57:34.168.2/32 *[OSPF/150] 00:34:54.0 172.80.1 via ge-0/0/0.1.1 via ge-0/0/0.6 10.1.1.1/32 *[OSPF/10] 00:56:18.80.1 via ge-0/0/0.80.0.1 via ge-0/0/0. tag 11 > to 192.80.80.1.80.0/30 *[OSPF/150] 00:34:54. tag 11 > to 192. tag 11 > to 192.1. Of course.1 10. metric 2.6 Summary *192.0/24 *[OSPF/150] 00:34:54.168.3/32 *[OSPF/150] 00:34:54.4 10.6 Seq 0x8000000c 0x8000000a 0x80000004 0x80000002 0x80000002 0x80000004 Age 501 726 1743 1735 1413 1090 Opt 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x1951 48 0x2617 36 0x57a0 32 0x72df 28 0x67e9 28 0xa0cb 28 . Chapter 5: Multiple Homogeneous Domains 71 You can tell from this output that the routes are in the database correctly. metric 2. 0 holddown. metric 0. tag 11 > to 192.0/24 *[OSPF/150] 00:34:54.0 192.0 Type ID Adv Rtr Router *10.168.168. .1 via ge-0/0/0.80.1. Let’s check: root@R6# run show ospf database area 0 OSPF database.1.0.168.1.80. tag 11 > to 192.0/24 *[OSPF/150] 00:34:54.168.1.168.168.29.19. 0 hidden) + = Active Route.6 via ge-0/0/1.168.0 192. metric 2.80.1 via ge-0/0/0.30.168.71.1.168.1. metric 0.168.0 224.80.1/32 *[OSPF/10] 00:56:18.1 192.1 Network 192. tag 11 > to 192.1. 18 routes (18 active.16.80.168.0. tag 11 > to 192.21.1 192.22. metric 1 MultiRecv You can see that all of the OSPF routes from the previous OSPF domain are inserted into the routing table of R6.80. metric 1.0 192.0 192.1.0: 18 destinations.168.0 192.6 Router 192.168.0 172.1.= Last Active. metric 4. tag 11 > to 192.80.19.0 192.168.72.1 via ge-0/0/0.80.1. tag 11 > to 192.4/32 *[OSPF/150] 00:34:54.6 via ge-0/0/1.0 10.1 via ge-0/0/0.1 Summary *172. The next verification confirms that all of the routes from the original OSPF domain are showing up within OSPF domain 2: root@R6# run show route protocol ospf inet.168.1.168.168.0/24 *[OSPF/150] 00:34:54.80.3.0 10.80.0/0 *[OSPF/150] 00:34:54.1 via ge-0/0/0.21.0.0. metric 2 > to 192.0 10.

168. . Careful use of policies and how they are tagged during export.1 10.3. because in the case of dual connections.4 192.80.1 10.168.71.168.0 192.80.2 192. You are able to maintain a single routing process for ease of troubleshooting and keep the knowledge of complex routing protocols within the operations organization.80.80.0 192.1 192. one could easily create routing loops since the routes between OSPF domains will be flagged as external.1.1 Seq 0x80000002 0x80000002 0x80000002 0x80000002 0x80000002 0x80000002 0x80000001 0x80000001 0x80000001 0x80000001 Age 1267 1029 791 554 316 78 2126 2126 2126 2126 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x816a 36 0xddfe 36 0xd308 36 0xd306 36 0xb0cf 36 0x2451 36 0x91d4 36 0x86de 36 0xd564 36 0xca6e 36 It’s clear that now R1 and R6 are both ABR’s and ASBR’s.168.80.0 192.168.16.0.168. Multiple OSPF domains can also be used as a mechanism to integrate two large enterprises in an acquisition or merger situation. can alleviate most of the problems.30.80.1.168.168. however. combined with metrics.1.168.168.80.168. 72 Day One: Advanced OSPF in the Enterprise OSPF Type Extern Extern Extern Extern Extern Extern Extern Extern Extern Extern AS SCOPE link state database ID Adv Rtr 0.1.168.168.1 192.168. Let’s continue our OSPF exploration with multiple autonomous systems (AS) in Chapter 6.1 10.80.1.0.3 192.0 192.72.1 192. Network engineers must be careful in such situations.80.168. Summary This chapter has shown that using multiple OSPF domains can be very useful to large organizations that have different regions or during the integration of two separate enterprises.1 192.168.1 192.29.0 192.0 192.0 192. They are both receiving and sending type-4 and type-5 LSA’s to each other.80.1.1 192.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Summary . . . . . . 84 . . . . . . . . . . . . . . . . . . . . . . .Chapter 6 Multiple Autonomous Systems Configuration of the Separate Autonomous System . . . . . . . . . .

1. 2nd Edition. but the advantages are the clean separation of the two autonomous systems within the network. at http://www. Configuration of the Separate Autonomous System This exercise adds routers R8 and R9. Doug Marshcke. At the end of this chapter you should be able to connect the two autonomous systems using a redistribution process. multiple homogeneous domains were used to show two different OSPF routing domains for large enterprises that might have offices in multiple regions. This requires either converting to all one protocol or to multiple autonomous systems routing management.net/books. Another routing domain option for these purposes is using a separate routing protocol and/or static routes between the two domains. or might need them for the purpose of integration. BGP. The redistribution process adds more control over what routes are seen between the two systems as well. Provider MPLS L3VPNs usually require the enterprise network to use static routes or BGP to connect to them. and Harry Reynolds. The chapter does not cover how BGP works in any depth. . In this chapter a new routing protocol.juniper. by Peter Southwick. This technique is becoming more and more prevalent with the advent of carrier-provided MPLS. it simply shows how the routes learned from BGP are interpreted by OSPF. These routers are a separate autonomous system having their own OSPF backbone Area 0. represented by R8. MORE? For more information on BGP as it pertains to the enterprise see Juniper Enterprise Routing. You should also be able to verify the functionality of the process and understand how to interpret the OSPF database. 74 Day One: Advanced OSPF in the Enterprise In the previous chapter. and you should see the routes in the OSPF database and the OSPF routing table. is used for connectivity between the two autonomous systems. as shown in Figure 6. represented by R9. and another OSPF Area 1. The latter kind of management may be a bit more complex because of redistribution and the support of another routing protocol.

it’s necessary to update the IP address and interface list.0/24 R4 Area 2 R3 Area 1 Internet R1 Autonomous System 1 Autonomous System 2 Area 0 R2 R2 Area 1 R8 R6 Area 0 Figure 6.30.1 OSPF Network with Multiple Autonomous Systems The routing protocol BGP will be used to connect the two separate autonomous systems.0/24 192. Chapter 6: Multiple Autonomous Systems 75 R5 RIP Network Static Routes 192.168.29. .168.1. with the addition of two more routers in the network. The type of BGP used will be EBGP since two separate autonomous system IDs are being used. And these are listed in Table 6. Also.

168.0 lo0.0 ge-0/0/1. Step 1 The OSPF configurations for R8 and R9 are listed below: [edit protocols] root@R8# show ospf { Area 0.90.1/30 fe-0/0/3.1.2.1.80.0.2/30 10.1.6/30 Ge-0/0/0.1.1.168.80.0 192.2/30 ge-0/0/1.0 ge-0/0/0.6/30 192.1.80.90.0 ge-0/0/0.5/30 10.5/30 192.0 fe-0/0/2.1.1/30 192.6/32 10.1.23.15.1.R3 R2 .1.0 ge-0/0/0.2.1.2/30 192.15.168.1. 76 Day One: Advanced OSPF in the Enterprise Table 6.0.9/32 ge-0/0/0.0 192.90.0.0 192.1/30 16.2/30 16.168.2/30 192.168.0 lo0.70.1/32 10.0 lo0.R2 R1 .70.2/32 10.1.0 ge-0/0/0. let’s start configuring the new additions.0 lo0.0 fe-0/0/2.80.168.7/32 192.0 Ge-0/0/1.168.168.23.0 ge-0/0/0.0 lo0.internet R2 .0 lo0.internet R6 – R1 R6 – R7 R6 loopback R7 loopback R8 – R9 R8 – R2 R8 loopback R9 loopback Updated IP Address and Interface List for Chapter 6 Interface IP Interface IP ge-0/0/0.3/32 10.0 ge-0/0/1.1/30 192.0 192.168.1 Link R1 .168.1.0 lo0.0 192.1.8/32 10.2/30 192.1.0 ge-0/0/1.168.1.168.4/32 192.1/30 With the design set. { .168.0 lo0.90.0 Fe-0/0/4.3.0 { interface lo0.R4 R1 loopback R2 loopback R3 loopback R4 loopback R5 – R3 R1 .1/30 192.0 Ge-0/0/0.168.168.5/30 192.168.1/30 10.3. passive.1.

Chapter 6: Multiple Autonomous Systems 77 } } Area 0.1.8 10.0 10.90.1.0.6 192.0.0.9 Network 192.1.0.168.1.91.0/24 Intra Network root@R8# run show ospf database OSPF database. Let’s check R8’s OSPF routing table.1.1.91.6 192.8 Router 10.0 ge-0/0/1. and database: root@R8# run show ospf route Topology default Route Table: Prefix Path Route Type Type 10.8 Summary *192.0.0 Nexthop addr/label 192.1.168.1 Type ID Adv Rtr Router *10.0 ge-0/0/1.0.1.1.1. All of the basic elements are there. } } [edit protocols] root@R9# show ospf { Area 0.168.1.90.8 Summary *192.1.1.4/30 Intra Network 192.0.9 10. interface ge-0/0/1.1.168.0.9 Intra Router 10.1.92.0 ge-0/0/1.90.168.1.1.1.168.1.1.1.9 Summary *10.0 lo0. Area 0.90.90.1.90. a backbone Area 0.9/32 Intra Network 192. interface lo0.1. Area 0.0.168.168.4 10.168.1 { interface ge-0/0/1.0.1.168.1.1.92.0 { passive.168.1.6 192.6 Seq 0x8000000b 0x80000003 0x8000000c 0x80000006 0x80000006 Seq 0x80000017 0x80000014 0x8000000b 0x80000008 Age 3 3 3 3 3 Age 3 4 4 3 Opt 0x22 0x22 0x22 0x22 0x22 Opt 0x22 0x22 0x22 0x22 Cksum Len 0x2e7 36 0x20f 28 0x1642 28 0x5b02 28 0x500c 28 Cksum Len 0x4619 36 0xc8c7 72 0xb377 32 0xf716 28 .0 ge-0/0/1.0/24 Intra Network 192.1.1.1.8 10.90. } } } You should notice that the configuration is a standard OSPF approach.8 10.0 10.9 10.8 Summary *10.6 10.0.8 OSPF database.0 Type ID Adv Rtr Router *10.1.1.0. interface fe-0/0/2.8/32 Intra Network 10. and a remote Area 1 with interfaces to external sources that the core needs to reach.1.8 NH Metric Type IP 1 IP 0 IP 1 IP 1 IP 2 IP 2 NextHop Interface ge-0/0/1.1.8 Summary *192.1 { interface ge-0/0/0.

So.168. Next the neighbor IP address and the neighbor’s peer-as number to peer with are needed.2 peer-as 65002 The purpose of this configuration is for you to get the very basics of BGP routing. Step 1 First the configuration of the autonomous system ID: set routing-options autonomous-system 65001 This is required when using BGP since BGP uses AS numbers to create route paths. Step 2 Now configure the BGP routing protocol: set protocols bgp group autonomous type external set protocols bgp group autonomous neighbor 192. diving deeply into BGP is not the goal of this chapter.168. these are the very basics of BGP configuration and all that is needed to display this example. external is displayed in the configuration since it’s peering to a different autonomous system number (EBGP). The next step is getting this network integrated into the existing OSPF network that was created in the earlier chapters of this book. and to verify that they are in a neighboring state. the goal is to configure a basic EBGP neighboring between R8 and R2. 78 Day One: Advanced OSPF in the Enterprise All of the routes are present and accounted for in the OSPF database. In this example.90. in this section.2 { peer-as 65002. The required configuration tells the router what type of BGP to use. } } } . The complete BGP stanza configuration shows as: [edit protocols] lab@R2# show bgp { group autonomous { type external.90. Again. neighbor 192. Configuration of the BGP Network As stated previously. but it is necessary to show the BGP configuration and neighboring to complete the exercise.

} } Now that both routers are configured for BGP. but there are no routes being shared between the routers as shown in the bolded output. The configuration stanza looks like this for R8: [edit protocols] root@R8# show bgp { group autonomous { peer-as 65001.1 The configuration difference between Router R2 and R8 is basically the peer-as and the neighbor IP address. which is almost exactly the same as R2’s: set routing-options autonomous-system 65002 set protocols bgp group autonomous peer-as 65001 set protocols bgp group autonomous neighbor 192. Step 4 The command issued on both routers is below: lab@R2# run show bgp summary Groups: 1 Peers: 1 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.. our learned OSPF routes between the routers are not being shared and a redistribution between the two devices is needed.1 65001 444 450 0 3 13:55 0/0/0/0 0/0/0/0 There is a peering relationship between the two routers and BGP is up.. . they should be in a peering state.90..90.168. 192.168.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/ Dwn State|#Active/Received/Accepted/Damped..90. The reason for this is clear. Let’s see.168. neighbor 192.90. 192.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/ Dwn State|#Active/Received/Accepted/Damped.168.2 65002 38 35 0 1 14:50 0/0/0/0 0/0/0/0 root@R8# run show bgp summary Groups: 1 Peers: 1 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet. Chapter 6: Multiple Autonomous Systems 79 Step 3 Now let’s configure R8.1.

1. Area 0.0. but are these routes in the OSPF database? Let’s take a look: root@R8# run show ospf database OSPF database. 192. Step 1 The configuration is as follows: set policy-options policy-statement ospf-to-bgp term 1 from protocol ospf set policy-options policy-statement ospf-to-bgp term 1 then accept This policy puts all of the routes learned from OSPF into BGP as an export within the BGP configuration once applied to the routing protocol.8 10.1.8 Summary *192. 80 Day One: Advanced OSPF in the Enterprise Connecting the Two Autonomous Systems You can use what you learned about redistribution in Chapter 4 to put the OSPF routes into BGP and send them to another autonomous network.1.90.1.0.1.8 Seq 0x80000012 0x80000008 0x80000012 0x8000000a Age 108 550 108 180 Opt 0x22 0x22 0x22 0x22 Cksum Len 0xf3ee 36 0xf714 28 0xa48 28 0x5306 28 .91.9 10.0 Type ID Adv Rtr Router *10.1 65001 521 523 0/0/0/0 History Damp State Pending 0 0 0 OutQ Flaps Last Up/ 0 3 46:23 19/19/19/0 You can see that routes are being learned from R2 via the BGP protocol.4 10.1..168.1.1.90.168. It shows that there are 19 routes learned via BGP.1.1.1.0 10.0 19 19 0 Peer AS InPkt OutPkt Dwn State|#Active/Received/Accepted/Damped.1..8 Summary *192.8 Summary *10. Step 2 Let’s apply it: set protocols bgp group autonomous export ospf-to-bgp Step 3 Now let’s show a BGP summary: root@R8# run show bgp summary Groups: 1 Peers: 1 Down peers: 0 Table Tot Paths Act Paths Suppressed inet.168.

8 Extern *192.3 10.0 10.8 10.1.1.8 10.1.0.0. This is because it’s necessary to redistribute the BGP routes into the OSPF process.9 10.1.1. Step 4 The configuration to redistribute the BGP routes in the OSPF process is as follows: set policy-options policy-statement bgp-to-ospf term 1 from protocol bgp set policy-options policy-statement bgp-to-ospf term 1 then accept set protocols ospf export bgp-to-ospf With this addition.1.1. Area 0.16.1.0.90.9 Summary *10.0.8 Summary *192.1.1.0 Type ID Adv Rtr Router *10.1.1.8 OSPF database.1.1.8 10.90.1.1.1.9 Summary *10.1.0 10.1.1.8 Extern *192.92.1.168.8 0x80000009 Seq 0x8000001d 0x80000017 0x8000000e 0x8000000b 1442 Age 108 1443 1443 1442 0x22 0x4a0f Opt 0x22 0x22 0x22 0x22 28 Cksum Len 0x3a1f 36 0xc2ca 72 0xad7a 32 0xf119 28 There are no routes from the original OSPF Autonomous system in the OSPF database of R8.1.1 10.8 Extern *192.19.9 10.1.8 10.0 10.168.8 Summary *192.8 OSPF database.1.6 10.22.1.1. Chapter 6: Multiple Autonomous Systems 81 Summary *192.1.1.168.16.0.1.8 Extern *10.0 10.1.0 10.1 10.91.18.8 Router 10.8 10.1 Type ID Adv Rtr Router *10. the OSPF database for R8 now looks like this: root@R8# run show ospf database OSPF database.168.1.168.1.1.8 Extern *192.1.1.1.1.1.0 10.1.92.1.1.1.17.1.1.90.8 Extern *10.1.168.1.19.4 10.29.1 10.1.1.8 Summary *192.8 Extern *10.1.1.1.1.9 Network 192.1.168.1 Type ID Adv Rtr Router *10.8 Extern *192.1.0.1.1.1.1.21.1.168.1.8 Extern *172.1.168.8 OSPF AS SCOPE link state database Type ID Adv Rtr Extern *10.1.6 10.1.1.2.1.3 10.1.8 Seq 0x80000012 0x80000008 0x80000012 0x8000000a 0x8000000a Seq 0x8000001d 0x80000017 0x8000000e 0x8000000c Seq 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 Age 485 927 485 557 187 Age 485 1820 1820 82 Age 485 485 485 485 485 485 485 485 485 485 485 485 Opt 0x22 0x22 0x22 0x22 0x22 Opt 0x22 0x22 0x22 0x22 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0xf3ee 36 0xf714 28 0xa48 28 0x5306 28 0x4810 28 Cksum Len 0x3a1f 36 0xc2ca 72 0xad7a 32 0xef1a 28 Cksum Len 0xcdc2 36 0xc3c9 36 0xafdd 36 0x9bef 36 0xe9db 36 0xdee5 36 0xa192 36 0xd755 36 0xe83a 36 0x1809 36 0xfd24 36 0x75a2 36 .1.9 10.9 Network 192.1.168.0 10.4 10. Area 0.168.1.0 10.8 Summary *10.1.1.1.168.6 10.1.1.8 Extern *172.8 Extern *192. Area 0.1.1.8 Router 10.

168.3/32 Ext2 Network 10.168.8 10.8 10.16.168.168.30.90.5 192.90.0 IP 16777214 ge-0/0/0.168.90.0 IP 2 ge-0/0/0.0/30 Ext2 Network 192.75.90.1.0 IP 2 ge-0/0/0.8 10.0/30 Ext2 Network 192.0/24 Ext2 Network 192.168.71.22.1.16.72.0 IP 1 fe-0/0/2.168.90.90.1.5 192.72.0 *192.90.0 IP 0 ge-0/0/0.0/24 Ext2 Network 192.5 192.1.168.168.0 IP 2 ge-0/0/0.5 192.75.0/23 Ext2 Network 192.5 192. all of the routes appear in the OSPF database and will be advertised to R9 via OSPF.9/32 Intra Network 172.0 IP 3 ge-0/0/0.30.1/32 Ext2 Network 192.1.168.0 IP 2 ge-0/0/0.0 IP 3 ge-0/0/0.1.1.90.76.5 192.0 IP 2 ge-0/0/0.168.168.0/24 Ext2 Network 192.0 IP 1 ge-0/0/0.0 IP 0 ge-0/0/0.0/24 Intra Network NH Metric NextHop Type Interface IP 1 ge-0/0/0.90.4/30 Intra Network 192.90.0 Nexthop addr/label 192.0/24 Ext2 Network 192.8 Intra Area/AS BR 10. The last step is reversing the configuration and adding the new OSPF AS into the original OSPF AS.168.0 IP 2 ge-0/0/0.91.168.0 IP 1 ge-0/0/0.90.1.5 192.0 *192.168.1.5 192.168.5 192.168.0 IP 0 lo0.168.5 192.5 192.168.90.5 192.5 192.1.1.8 10.17.5 192.5 192.4/32 Ext2 Network 10.1.0 *192.0 IP 3 ge-0/0/0.168.80.8 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 0x80000001 485 485 485 485 485 485 485 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x6aac 0xb932 0xae3c 0x7b6f 0x8c59 0x8163 0x1cc5 36 36 36 36 36 36 36 Now.168.0/24 Ext2 Network 192.0 IP 2 ge-0/0/0.90.5 192.1. .90.0 IP 1 ge-0/0/0.29.1/32 Ext2 Network 10.0 IP 3 ge-0/0/0.0 *192.90.168.5 192.168.1.168.1.76.90.19.90.1.168.168.5 All of the OSPF routes from the original autonomous system are now in the new autonomous system.6/32 Ext2 Network 10.0 IP 2 ge-0/0/0.1.0/24 Ext2 Network 192.77.4 10.168.90.168.71.1.5 192.0/30 Ext2 Network 192.90.21. Let’s double-check: root@R9# run show ospf route Topology default Route Table: Prefix Path Route Type Type 10.1.1.90.0 IP 1 ge-0/0/0.90.80.1.0/21 Ext2 Network 192.0 IP 3 ge-0/0/0.168.1.0/24 Ext2 Network 192.1.168.0 IP 1 ge-0/0/0.8/32 Inter Network 10.8 10.168.168.1/32 Ext2 Network 172.168.19. 82 Day One: Advanced OSPF in the Enterprise Extern Extern Extern Extern Extern Extern Extern *192.168.8 10.5 192.0 *192.168.1.0 *192.5 192.0/24 Intra Network 192.1.2.168.1.18.168.1.1.168.168.92.0 IP 1 ge-0/0/1.168.4/30 Ext2 Network 192.168.77.90.168.168.168.

90. } } ospf { export bgp-to-ospf. } } area 0. neighbor 192.2 { area-range 192.1.0 { interface lo0.0 { passive.90. } } . area 0. } } } [edit protocols] root@R8# show bgp { group autonomous { peer-as 65001.0.0 { priority 100.168.2 { peer-as 65002. export ospf-to-bgp. neighbor 192.168.1 { interface ge-0/0/1.0. } interface lo0.0.0 { passive.0.0.0.0/21. area 0.168.0. } } area 0. interface ge-0/0/1.0 { interface ge-0/0/0. Chapter 6: Multiple Autonomous Systems 83 The total protocol configuration for R8 and R2 is: [edit protocols] lab@R2# show bgp { group autonomous { type external. } } } ospf { export [ redistribution bgp-to-ospf ].0 { interface-type p2p.0.16.0.

using multiple autonomous systems can keep routing processes separate due to the use of a second routing protocol. Both of these routers will be classified as ABR’s. It provides a very clean separation between networks and allows for separate management of those networks as well. 84 Day One: Advanced OSPF in the Enterprise Lastly. is next. from the above output there will be type-4 and type-5 LSA’s shared between R8 and R2. is understanding and managing this other protocol. Chapter 7: Virutal Links. Our final chapter. The drawback. . of course. and careful manipulation of the routing tables. There are also redistribution considerations that need to be made when using multiple autonomous systems. and if multiple routers are used. care must be taken to prevent loops through the tagging. and BR’s. ASBR’s. Compared to separate OSPF domains from the previous chapter. Summary Using multiple autonomous systems to connect networks together is a common practice.

. . . 96 . . . . . . . . . . . . . . . . . . .Chapter 7 Virtual Links Configuration of the Virtual Link . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

there will be multiple backbone Area 0s that are physically separated. but as an interim solution one could extend an existing outlying area and connect the newly obtained backbone Area 0 to the existing one. and allow connectivity of the two area border routers of the newly formed Area 0 connection through the outlying area’s network. This is called OSPF virtual links. The outlying Area 2 will be a transit area logically connecting R10 to R2 as a backbone ABR router. when would this be useful? Well in the event of company mergers. The outlying area would be a transit area for the backbone Area 0. The chapter also updates our existing network topology as shown in Figure 7. and so it requires a virtual link. and it is described in RFC2328. In this chapter you learn how to configure the virtual OSPF link and verify its functionality across the network. One may ask.1. . Configuration of the Virtual Link You can see that with the addition of R10. as mentioned in previous examples. and with Area 3 connected to it. there is no direct path to the backbone Area 0. 88 Day One: Advanced OSPF in the Enterprise Virtual links within OSPF have two basic functions. The first is to connect a physically discontiguous backbone Area 0 and the other is to connect a physically detached area to the backbone Area 0 through another area. In most cases the long term plan would be to physically connect the backbone areas.

168.0/24 192.168. .0/24 R4 Area 2 R3 Area 1 Internet R1 Autonomous System 1 Autonomous System 2 Area 0 R2 R2 Area 1 R9 R8 Area 0 Figure 7.1 Example Network with Virtual Link The interface and IP addresses for our virtual link assignment are found in Table 7. Chapter 7: Virtual Links 89 Area 3 R5 RIP Network R10 Static Routes 192.29.30.1.

0 lo0.75.15.1.1/30 192.168.2/30 16.168.80. so in this case routers R10 and R2 will be the ABRs.2/30 ge-0/0/1.4/32 192.6/30 Ge-0/0/0.0 ge-0/0/0.2/30 10.80.168.0 Ge-0/0/0.168.0 lo0.8/32 10.5/30 10.168.R4 R1 loopback R2 loopback R3 loopback R4 loopback R5 – R3 R1 .0 192.0 lo0.1.9/32 192.1.168.3. with R4 as the transit for the virtual link.5/30 192.1.0 Fe-0/0/4.R2 R1 .2/30 10.5/30 192.1/30 16.0 192.0 ge-0/0/1.1.0 Ge-0/0/1.1/32 10.0 ge-0/0/1.1.0 Ge-0/0/0.80. .2/30 192.2/30 192.0 ge-0/0/0.2.168.1.0 192.2.0 fe-0/0/2.168.168.1.1.6/30 192.1.internet R6 – R1 R6 – R7 R6 loopback R7 loopback R8 – R9 R8 – R2 R8 loopback R9 loopback R10 – R4 R10 loopback Interface and IP Addresses for Virtual Links Interface IP Interface IP ge-0/0/0.75.0 192.0 192.80.0 lo0.90.1.1 Link R1 .3.1/30 10.0 lo0.1.0 ge-0/0/1.2/30 192.0 ge-0/0/0.1/30 fe-0/0/3.90.90.1/30 Ge-0/0/3. each router in the virtual path is an ABR.7/32 192. 90 Day One: Advanced OSPF in the Enterprise Table 7.168.R3 R2 .168.23.1.168.0 fe-0/0/2.1.0 lo0.1/30 192.1/30 For the virtual link to work.2/32 10.1.168.0 192.1.0 ge-0/0/0.3/32 10.10/32 ge-0/0/0.1.168.23.0 ge-0/0/0.6/32 10.internet R2 .70.1.0 lo0.1.1.70.15.168.0 lo0.168.168.1/30 192.90.168.0 lo0.

2 Summary 10.1.1.2 { interface ge-0/0/0.0 [OSPF/150] 00:26:57. Area 0.2 Summary 192. Area 0.10 Router 192.1.10 Seq 0x80000004 0x8000000a 0x80000006 0x80000003 0x80000003 0x80000002 0x80000003 0x80000002 0x8000000d 0x80000002 0x80000004 0x80000003 0x8000000a 0x80000002 Seq 0x80000002 Age 1154 1796 703 2430 919 948 148 748 1154 548 1188 1188 1154 348 Age 1148 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x9b7e 48 0xc993 108 0xa4ee 36 0xdfbc 60 0x5dea 32 0x78a7 28 0x62bc 28 0x6eae 28 0x3783 28 0x4c77 28 0xee7e 28 0xe587 28 0x5abc 28 0x60bb 28 Opt Cksum Len 0x22 0xe5a0 48 .1.1.77.168.2 Summary 192. .168.1.1.1.0.1.1.1.0.0. From R10’s perspective.1.2 Summary 10.4 10.1.1. interface fe-0/0/2.1.= Last Active.1. there is a neighboring relationship to R4.168.0 10.1.0 inet.1.10 ASBRSum 10.1.1.2 OSPF database.0 10.1. and LSA’s are being sent and received. 0 holddown.1. Let’s confirm: lab@R2# run show route 192.0 10.2 Type ID Adv Rtr Router 10.75.2 10.2 ASBRSum 10. } With this configuration you can see that R2 will not receive any routes from R10’s Area 3.6 via fe-0/0/2.1.0.168.1.1.0.2 10.15.1.0.1.0 10.2 10.10 Summary 10.0. metric 0.1.1.1.168.0.23.1.0. * = Both 0.1.2 Router 10.168. so the LSA database looks like the following: root@R10# run show ospf database OSPF database. Chapter 7: Virtual Links 91 Step 1 The initial configuration of R10 is: [edit protocols ospf] root@R10# show Area 0.168.10 10.3 { interface ge-0/0/1.3 Type ID Adv Rtr Router *10.168.1 10.4 Router *10. } Area 0.1.0.1.1. 26 routes (25 active.1.2.16.0.1.0.1.10 Summary *192. 0 hidden) + = Active Route. tag 0 > to 192.1.1.1.2 192.1.1 10.1.1.3 10.0/0 *[Static/5] 00:27:49 > to 16.0: 25 destinations.0 Instead it’s pointing to the default route that was added in Chapter 4.1.16.1 via ge-0/0/0.76.10 10.1.1.2 Summary *192.0.76.3 10.168.2 Network *192.1.

1.1.168.1.1.1.0 10.1.0 10.168.16.10 Summary 192.1. Area 0.1.29.1 0x80000002 0x80000002 0x80000002 0x80000001 0x80000001 0x80000004 0x80000004 0x80000004 Seq 0x80000003 0x80000002 0x80000002 0x80000002 0x80000002 0x80000002 0x80000002 487 271 57 1188 1188 1151 1151 1151 Age 1169 1748 1046 1250 422 1417 1293 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x2aea 0x11a9 0x812c 0x9415 0x7a30 0xe789 0x36dc 0x18f9 28 28 28 28 28 28 28 28 Cksum Len 0x8d16 36 0x891a 36 0x780f 36 0x8b8f 36 0x8099 36 0x934f 36 0x8859 36 From R10’s perspective everything looks normal and it is sending out LSA’s for Area 3.3 10.30.10 OSPF database.1.1 10.168.1.1.1 Summary *192.1.1.16.10 ASBRSum 10.1.1.168.10 ASBRSum *10.0 10.71.0 10.2 Summary 10.0 10.0 10.1.1.1.1 10.1.1.10 ASBRSum *10.2 Summary 192.0.2 Extern 10.168.4 Extern 192.1.1.1.1.1.168.1.1.1.168.6 10.168.4 10.0 Type ID Adv Rtr Router 10.1.1.1.1.168.1.1.1.3.0 10.2 Seq 0x80000008 0x80000008 0x80000005 0x80000003 0x80000002 0x80000002 0x80000001 0x80000003 0x80000003 0x80000001 0x80000002 0x80000001 0x80000001 0x80000001 0x80000004 0x80000005 0x80000004 0x80000005 0x80000009 0x80000004 Age 906 1385 2025 782 1771 1578 2029 2085 1778 2029 1379 2029 2029 2029 1385 2025 2025 164 1385 2025 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Cksum Len 0x2af0 48 0x3ed8 48 0xebbf 60 0x584f 32 0x6ab4 28 0x5ac2 28 0x2ce9 28 0x467e 28 0x358d 28 0x13a8 28 0xaa0e 28 0x832b 28 0x9415 28 0x7a30 28 0x2256 28 0xe58a 28 0x36dc 28 0x56c4 28 0x3ed6 28 0x18f9 28 Seq 0x80000004 Age 1385 Opt Cksum Len 0x22 0x9b7e 48 .1.1.168.1.1.3.1 Extern 192.10 Summary *192.10 ASBRSum 10.1.10 Summary *192.1.0.0.1.4 Extern 192.0 10.1.1.2 10.0 10.3.168.168. Area 0.0.1.10 Summary *192.0 10.3 10.0 10.1.1 ASBRSum *10.1.4 10.72.4 10.1.0 10.1.1.1.0 10.4 10.1.1.1.1.2 Router 10.1.1.1.17.1.10 Summary 192.10 Summary *192.1.1.10 OSPF AS SCOPE link state database Type ID Adv Rtr Extern 0.168.1.10 10.1.1.1.4 10.1.2 10.1.10 Summary 192.0 10.0 10.10 Summary *192.1.2 10. Now let’s take a look at R2’s LSA database to determine why these routes are not being accepted: lab@R2# run show ospf database OSPF database.1.1.16.1.1.1.168.2 10.4 10.2.0.1.0.0 10.168.2 Summary 192.1.0 10.1.1.1.1 Summary *10.1.1.1.18.75.1.1.1.1.0 10.1.2 Type ID Adv Rtr Router *10.75.2 ASBRSum 10.10 Summary *192.1.75.1.1 Extern 0.1. 92 Day One: Advanced OSPF in the Enterprise Summary *10.0.1.0.1.17.1.1.1.1.1.0 10.168.10 Summary *192.10 Network 192.1.1.1.2 Summary 192.168.1 Summary 10.1 Router *10.0 10.18.168.1.1 Extern 192.1.1.168.1.

1.10 10.76.168.1.1.2 OSPF AS SCOPE link state database Type ID Adv Rtr Extern 0.10 flood state Idle -> Idle.1 10.71.1.76.1 10.879940 id 192.4 10.1.2 Summary *192.1.1 0x8000000a 0x80000006 0x80000003 0x80000003 0x80000002 0x80000003 0x80000002 0x8000000d 0x80000002 0x80000004 0x80000003 0x8000000a 0x80000002 Seq 0x80000003 0x80000003 0x80000002 0x80000002 0x80000002 0x80000002 0x80000002 2029 938 2663 1154 1179 379 979 1385 779 1423 1423 1385 579 Age 1400 179 1277 1483 655 1648 1524 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 Opt 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0xc993 108 0xa4ee 36 0xdfbc 60 0x5dea 32 0x78a7 28 0x62bc 28 0x6eae 28 0x3783 28 0x4c77 28 0xee7e 28 0xe587 28 0x5abc 28 0x60bb 28 Cksum Len 0x8d16 36 0x871b 36 0x780f 36 0x8b8f 36 0x8099 36 0x934f 36 0x8859 36 The routes are not showing up in the LSA Database.0 10.1.3 10.1.168.168.1.1.3.168.0 10.0.76.10 Summary 192.168.1.76.1. Chapter 7: Virtual Links 93 Router 10.1.0 10.1.0 10.1.1 Extern 192. Step 1 The configuration for traceoptions is as follows: set protocols ospf traceoptions file ospfdebug set protocols ospf traceoptions flag all This configuration flags all OSPF traces to a file called ospfdebug.1.1.2 192.1.1.77.0 10.10 Nov 14 00:05:02.1.2 Extern 10.2.168.1.1.1.0 10.1.1.168.1.1.056527 LSA Summary 192.10 from 192.057400 OSPF LSA Summary 192.1.168. adv rtr 10.1.0.1.10 from 192. Nov 14 00:05:02.4 Extern 192.168.0.168.1. type Summary (0x3).1. Now you can take a look at this file for the purpose of understanding why it should not be added into the database: [edit protocols ospf] lab@R2# run show log ospfdebug | match 192.10 ASBRSum *10.1.924009 type Summary (3).76.1. let’s do a trace options on the OSPF process within R2 to see why.1.0 10.168.168.2 ASBRSum *10.76.16. age 0xe8 Nov 14 00:05:03.1.0 adv-rtr 10. age 0xe7 Nov 14 00:05:02.76.4 Extern 192.29.1.1.0 10.1.168.168.1.1.1.0 10.10 (flood state Idle) Nov 14 00:05:02.2 Summary *192.168.1.30.0 10.168.2 Network 192.1.570189 Deleting LSA Summary 192.1.056716 ospf_set_lsdb_state: Summary LSA 192.168. new LSA Nov 14 00:05:03. id 192.1. type Summary (0x3).1.168.0.0.2 Summary *10.168.2 Summary 192.1.985456 id 192.1.2 10.0 10.1.16.4 Router 10.1.1.2.76.1.10 Router 192.168.1.0.0 10.3.10 Summary *10.2 newer than db Nov 14 00:05:03.1.056223 OSPF LSA Summary 192.3 10.2 Summary *10.6 10.1.75.1.1 Extern 192.0 10.1.1.168. LSA .1.1.0 10.76.1.1.0.168.1.1.1.72.1.1 Extern *0.76.10 state QUIET->QUIET Nov 14 00:05:03.2 10.

94

Day One: Advanced OSPF in the Enterprise

changed from its last instance Nov 14 00:05:03.057598 OSPF LSREQ for LSA Summary 192.168.76.0 10.1.1.10 satisfied for nbr 192.168.3.2 on ge-0/0/1.0 area 0.0.0.2 Nov 14 00:05:03.057800 LSA Summary 192.168.76.0 10.1.1.10 flood state Idle -> Standby send, flooding Nov 14 00:05:03.057972 Updating LSA Summary 192.168.76.0 10.1.1.10 (flood state Standby send) Nov 14 00:05:03.058511 LSA Summary 192.168.76.0 10.1.1.10 flood state Standby send -> Wait nbr ack, not queued Nov 14 00:05:03.058716 OSPF LSA Summary 192.168.76.0 10.1.1.10 newer, delayed ack Nov 14 00:05:03.132603 OSPF LSA Summary 192.168.76.0 10.1.1.10 same as ge-0/0/1.0 area 0.0.0.2 192.168.3.2 LSREQ Nov 14 00:05:03.132887 OSPF LSA Summary 192.168.76.0 10.1.1.10 on no ge-0/0/1.0 area 0.0.0.2 rexmit lists, no flood Nov 14 00:05:03.133080 LSA Summary 192.168.76.0 10.1.1.10 flood state Wait nbr ack -> Idle, not queued Nov 14 00:05:03.348101 Adding Network summary route 192.168.76.0/24: origin 10.1.1.10 Nov 14 00:05:03.391055 CHANGE 192.168.76.0/24 nhid 0 gw 192.168.3.2 OSPF pref 10/0 metric 3/0 ge-0/0/1.0 <Active Int> Nov 14 00:05:03.391489 ADD 192.168.76.0/24 nhid 0 gw 192.168.3.2 OSPF pref 10/0 metric 3/0 ge-0/0/1.0 <Active Int> Nov 14 00:05:03.391804 Route 192.168.76.0/24 has changed (other) Nov 14 00:05:03.392071 Considering autosummary for 192.168.76.0/24, summary possible=1 Nov 14 00:05:03.392714 Considering NSSA autosummary for 192.168.76.0/24, summary not possible Nov 14 00:05:03.590700 Adding Network summary route 192.168.76.0/24: origin 10.1.1.10 Nov 14 00:05:03.598065 Route 192.168.76.0/24 is unchanged Nov 14 00:05:04.027834 id 192.168.76.0, type Summary (0x3), age 0xe8 Nov 14 00:05:11.896209 id 192.168.76.0, data 255.255.255.0, type Stub (3) Nov 14 00:05:12.367939 CHANGE 192.168.76.0/24 nhid 565 gw 192.168.3.2 OSPF pref 10/0 metric 3/0 ge-0/0/1.0 <Delete Int> Nov 14 00:05:12.368227 Route 192.168.76.0/24 has been deleted Nov 14 00:05:12.368486 Considering autosummary for 192.168.76.0/24, summary possible=0 Nov 14 00:05:12.368978 Considering NSSA autosummary for 192.168.76.0/24, summary not possible

From this output you can see that the route 192.168.76.0/24 was removed from the LSA database and was not put into the routing table. The reason is that within OSPF every area must be connected to the backbone Area 0. In this case, R10 is not. For the configurations to function properly a virtual link must be added to connect R10 to the backbone Area 0 through R2.

Configuration of the Virtual Link
In order to see the Area 3 routes within the backbone Area 0, a virtual link configuration must be done on both R10 and R2.

Chapter 7: Virtual Links

95

Step 1

The configuration for R2:
set protocols ospf area 0.0.0.0 virtual-link neighbor-id 10.1.1.10 transitarea 0.0.0.2

Step 2

The configuration for R10:
set protocols ospf area 0.0.0.0 virtual-link neighbor-id 10.1.1.2 transitarea 0.0.0.2

In this configuration each virtual link has a transit area of 0.0.0.2 because Area 2 is the “connecting” area for the two routers. Another piece of the configuration shows that the neighbor-ids listed are the loopback interfaces of the R10 and R4. In fact, the OSPF router-id must match the router-id and must either be configured manually (as configured in Chapter 2) or automatically. If you do not set the neighbor-id to the remote router’s router-id, the link will not come up. Once the configuration is committed to the routers the following command shows there is a neighboring relationship between the two routers:
root@R10# run show ospf neighbor Address Interface 192.168.75.1 ge-0/0/0.0 192.168.3.1 vl-10.1.1.2 State Full Full ID 10.1.1.4 10.1.1.2 Pri 128 0 Dead 32 32

The virtual interface vl-10.1.1.2 is the created virtual link to R2. This shows that there is a peer and the state is in full. A closer look reveals:
[edit protocols ospf] root@R10# run show ospf interface vl-10.1.1.2 detail Interface State Area DR ID BDR ID vl-10.1.1.2 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 Type: Virtual, Address: 192.168.75.2, Mask: 0.0.0.0, MTU: 0, Cost: 2 Transit Area: 0.0.0.2, Destination: 192.168.3.1 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Topology default (ID 0) -> Cost: 0

Nbrs 1

This detail output shows more of the peering and also shows the transit Area 2, which is important to note for any operations personnel who would be troubleshooting a network issue.

96

Day One: Advanced OSPF in the Enterprise

From R2’s perspective, the LSA database can see the peer of R10 as an ABR with a type-4 link, which represents a virtual link. This is confirmed by issuing the following command:
lab@R2# run show ospf database lsa-id 10.1.1.10 detail OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Router 10.1.1.10 10.1.1.10 0x80000008 bits 0x1, link count 1 id 10.1.1.2, data 192.168.75.2, Type Virtual (4) Topology count: 0, Default metric: 2 Topology default (ID 0) Type: Virtual, Node ID: 10.1.1.2 Metric: 2, Bidirectional

Age 419

Opt Cksum Len 0x22 0xf73f 36

Now that there is a peering relationship between R2 and R10, the routes for 192.168.76.0/24 and 192.168.77.0/24 from Area 3 are in the routing table for R2, as shown here:
[edit protocols ospf] lab@R2# run show route 192.168.76.0 inet.0: 27 destinations, 28 routes (27 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.76.0/24 *[OSPF/10] 00:35:21, metric 3 > to 192.168.3.2 via ge-0/0/1.0 [edit protocols ospf] lab@R2# run show route 192.168.77.0 inet.0: 27 destinations, 28 routes (27 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.77.0/24 *[OSPF/10] 00:35:26, metric 3 > to 192.168.3.2 via ge-0/0/1.0

And this verifies that the virtual link is functioning and that the routes from Area 3 will be seen throughout the network.

Summary
Using Virtual Links can help network administrators integrate backbone areas or extend them for redundancy purposes. Note that this type of connectivity should really be considered a short term solution to a problem. At some point it should be replaced with a more permanent link to the existing backbone Area 0. The main reasons for making this a temporary configuration are for troubleshooting purposes – virtual links add complexity to networks that should be avoided if at all possible.

97 .

If you want the fast track to earning your certifications in enterprise routing. or security use the available online courses.com. switching. Register to participate in this free forum. print copies are available for sale at Amazon or www. (The library is available in eBook format for iPads and iPhones from the Apple iBookstore. www . The documentation set is both comprehensive and thoroughly reviewed by Juniper engineering. and solutions. by Jeff Doyle • Junos Enterprise Routing.net/techpubs/ Juniper Networks technical documentation includes everything you need to understand and configure all aspects of Junos. 98 What to Do Next & Where to Go http://www . • Junos Cookbook. student guides.juniper . technologies. Macs and PCs by visiting the Kindle Store. and lab guides. Select titles also feature a Copy and Paste edition for direct placement of Junos configurations. Androids.juniper . al.juniper .vervante. including MPLS.) http://forums . or at one of the partner training centers around the world. or download to Kindles.juniper .juniper .net/books The following books may assist your further exploration of OSPF: • OSPF and IS-IS. on location. by Jack Parks http://www . Blackberrys. 2nd Edition.net/dayone The Day One book series is available for free download in PDF format. by Aviva Garrett • Day One: Migrating EIGRP to OSPF. . The Juniper Network Technical Certification Program (JNTCP) allows you to earn certifications by demonstrating competence in configuration and troubleshooting of Juniper products. et. best practices. In addition.net/training/fasttrack Take courses online. by Peter Southwick.net/jnet The Juniper-sponsored J-Net Communities forum is dedicated to sharing information. www . and questions about Juniper products.