Juniper JNCIA JN0-103 – Routing Fundamentals Part 4
- OSPF
Welcome back. In this lecture, we’ll talk about open shortest path first routing, also known as OSPF routing. Let’s begin. OSPF is an interior gateway protocol designed to be used within an autonomous system. We spoke about autonomous systems in the earlier lecture. An autonomous system is a collection of routers within a common administrative domain.
So OSPF is an interior gateway protocol designed to be used within an autonomous system. OSPF uses the concept of link state advertisements, also known as LSAs. Link state advertisements are used to send information about attached interfaces, metrics, and other variables. Think of it like a packet. A packet which is used to send information about locally connected interfaces, some metrics, and some variables. And these packets are called as link state advertisements.
This link state information is used to compute the shortest path to every router, or in other words, to each node. Autonomous systems can further be divided into areas. An OSPF area is a logical group of routers. So you have an autonomous system which is a collection of routers within a common administrative domain, and the autonomous system can be further divided into areas. An area is simply a logical group of routers. Routers with multiple interfaces can belong to multiple areas, so one interface can belong to one area, while another interface can belong to another area.
These routers which belong to multiple areas are called as area border routers. These routers create and maintain a database for each area. This database is called as the link state database. Link state databases contain link state advertisements received from all routers within the same area. Routers within the same area share the same information, hence, they have identical link state databases. To ensure correct routing knowledge and connectivity, OSPF maintains a special area called as the backbone area. OSPF designates the backbone area as area zero.
All other OSPF areas must connect themselves to the backbone area for connectivity. All data traffic between OSPF areas must transit the backbone area. I have a diagram on the screen right now which will help you understand the concept of autonomous system and areas. The diagram has just one autonomous system. 65535 this autonomous system has been divided into three areas. We have area zero in the center, area one in the left, and area two in the right. Area Zero is called as the backbone area. We have two routers which have special significance the router over here because it belongs to area one and also area zero, and the router over here because it belongs to area two and area zero.
These routers which belong to multiple areas are called as area border routers. If area one wanted to communicate with area two, it must transit through the backbone area. Let’s now talk about a specific area. We are still talking about the same autonomous system, but we are now going to focus only on OSPF area zero, the backbone area. This area has three routers, but let’s talk only about one router which is on the left hand side. This router has three interfaces fe One, Fe Two and Fe Three. If I wanted to configure OSPF on this router the configuration would look like this. We first have to be under the edit protocols OSPF hierarchy and then we need to configure the interfaces to participate in OSPF. These interfaces belong to the router which is part of area zero. So we would do something like this set area zero interface Fe 10 set area zero interface Fe 20.
And finally, set area zero interface Fe 30. And we’d also add the word passive because interface Fe three will be connecting to another router which is not part of area zero. We do not want Interface Fe three to form an adjacency with the router on the left hand side which belongs to another area. That’s what we can achieve with the keyword passive.
And when we do the show command we can see the area zero with all the three interfaces configured. From the examination perspective we are not required to know the configuration of OSPF. In fact, the blueprint says you must only be aware of a case study for OSPF which is why we’re not going to configure this on the device. Well, that’s about OSPF. I hope you found that interesting. In the next lecture, we’ll talk about routing instances. I’d like to thank you for watching and I’ll catch you in the next video. Thank you.
- Routing Instances
Welcome back. In this lecture, we’ll talk about routing instances. Let’s begin. All right, so what do we mean by a routing instance? A routing instance is a collection of routing tables, interfaces, and routing protocol parameters. We can have multiple routing tables inside a single routing instance. For example, we may have one routing table for IPV Four unicast, one routing table for IPV Six unicast, and one routing table for IPV Four Multicast. All of these can exist in the same routing instance. Each routing instance has a unique name and a corresponding IP uniqast table. For example, if you configure a routing instance with the name My instance, the corresponding IP unicast table would be Myinstance Inet Zero. All routes for my instance are installed into my instance inet zero. Using routing instances, a single Juno’s device can effectively imitate multiple devices.
Think of a situation where you are a network service provider. You’re using the Juno’s device to provide network services to multiple customers. Every Juno’s device has a default routing instance called as the master routing instance, but you can create multiple routing instances. Let’s assume you have two customers that you are serving with the same Junos device. In this case, you can create one routing instance for each customer. Every routing instance has its own routing tables, its own interfaces, and routing protocols. Effectively, you have converted a single Juno’s device into multiple logical Junos devices. That’s the power of routing instances. For example, on the screen right now, I have the routing instances of a Juno’s device.
The master routing instance is default. Apart from that, we have two more routing instances, one for Customer A and one for Customer B. In each of the routing instance, we have the default IPV four unicast routing table inet zero, customera inet zero and customerb inet zero. We also have IPV. Six unicast tables inet 60, customer A inet 60, customer B in 60. Each of the routing instances has its own set of interfaces, and each of the routing instances may have its own routing protocol parameters. Juno creates a default unicast routing instance called as the master routing instance. By default, the master routing instance includes the Inet Zero routing table which the device uses for IPV four unicast routing. The software creates other routing tables such as Inet 60, adds them to the respective routing instances, and displays them when required by the configuration.
The Juno’s operating system also creates private routing instances which the device uses for internal communications between hardware components. These can be ignored when planning the network. Let me take you on the device and show you how this looks like. All right, I’m on a Juno’s device. I’m first going to enter the configuration mode. Or let’s do this. Let’s take a look at the default routing instance first.
So I’m going to say show Route space instance, and I’ll hit a enter. So we have the routing instances listed on the screen. Right now. We can see that we have the master routing instance and it has the init zero routing table, and we can see the number of routes installed in that routing table. So we have five routes, and by now we should know the meanings of active hold down and hidden routes like we understood. Juno’s also creates some private routing instances for internal communications, and you can see that over here you have some private routing instances as well. Let’s see how we can create a new routing instance. So I’m going to first enter configuration mode with the Edit command, and then I’m going to enter the routing instance configuration hierarchy, which is edit routing space instances, and I’m going to give it a name, so I’m going to call it as my instance, hit Enter.
First up, we’ll start by adding some interfaces. So I’m going to say Set interfaces and I’m going to add Fe zero slash zero, slash two dot zero. Let’s also add a routing table. So I’m going to say Edit routing options, routing options. Let’s do a question mark, and we’re looking at this one static. I’m trying to add a static route for this routing instance. I’m going to say Edit routing options static. So now we have entered that configuration hierarchy. I’m going to say Set route zero. Let’s do a question mark, and we are looking at the option over here, which is called as Next Hop. You have it over here, so I’m going to say Next Hop, and we need to give the next hop IP address. And I’m going to add a hypothetical next top IP address which is 192-1682, let’s say 100.
Hit Enter. I’m going to go one level up and one level up. So right now I’m in Edit routing instances, my instance. Let’s also try to enable OSPF for this routing instance. So I’m going to say Edit protocols OSPF, hit Enter, and I’m going to add the interface into this routing protocol. So I’m going to say Set interfaces, or in fact the command is set area zero like we understood in the last lecture, right? So set area zero, question mark, and we’re going to say Interface and let’s add Fe 20. Hit Enter. Looks good. I’m going to go one level up again and up, and I’m going to do a show.
So this is what we’ve configured right now. We’ve configured the routing instance with the name My instance. We’ve added an interface into it which is Fe 20. We’ve also set a static route for it, so the static route points to the next top IP address which is 198-2168, 200, and we’ve also enabled OSPF. So OSPF area has the interface Fe 20 in it. So that’s how you configure a routing instance. All right, so that’s it for this lecture. I’d like to thank you for watching and I’ll catch you in the next lecture. Thank you.
- Summary of Section 6
Welcome back. In this lecture, we’ll summarize all that we learned in Section Six. Let’s begin. So in Section Six, we started by talking about static routing and dynamic routing. We understood that static routing tables are created and updated manually, while dynamic routing tables are created and updated by a routing protocol. Static routing is in fault tolerant, which means when there is a change on the network, it is not automatically detected by static routing, while dynamic routing detects changes on the network and updates routes automatically. Static routing works well for small networks and especially when we need tight control over routing, while dynamic routing is preferred for large networks. We then spoke about Juno’s routing and forwarding tables. The routing table contains statically configured routes, directly connected interface routes, and all routing information learned from all routing protocols. The routing protocol process uses the collected routing information to select the active route to each destination.
The active route is the route that is actually used to forward packets to that destination. By default, the Juno’s operating system maintains three routing tables one for unicast routes, one for multicast routes, and a third for MPLS. Juno’s installs all the active routes from the routing table into another table, which is called as the forwarding table. The Juno’s operating system routing protocol process assigns a default preference value to each route that the routing table receives. This is same as administrative distance on equipment from other vendors. The default preference value depends on the source of the route. For example, direct and local routes have a preference of zero. Static routes have a preference of five OSPF. Internal routes have a preference of ten. Routing information protocol routes have a preference of 100, and BGP routes have a preference value of 170.
Default preference value for most routing information sources can be modified to make them more or less desirable. The exception to this is direct and local routes. If equal cost pads exist for the same destination, one of the available pads is randomly selected. This approach provides load distribution among the pads. We then understood how to configure static routing routes that are permanent. Fixtures in the routing and forwarding tables are often configured as static routes. To create a static route, you must define the route and associate a Next Hop IP address. The Next Hop IP address is the IP address to which the Juno’s device will pass the packet. In order to be forwarded and reach the destination, we can use the keyword called no Readvantage to prevent a static route from being re advertised.
This is usually recommended for routes that are used for management purposes. We also understood that if the Next Hop IP address is not reachable using a direct route, we can use the keyword resolve on equipment from other vendors. This happens automatically, which means if the Next hub IP address is not directly reachable, it still works on equipment from other vendors. On Juno’s devices, this has to be done explicitly. If the Next Hub IP address is not a directly reachable IP, then we have to use the keyword called resolve. In addition to the resolve option, there must exist a route to the indirect NextTop IP address as well. A static route can have multiple Next Top IP addresses associated with it. The route with a lower route preference value is used to route traffic. It is possible to influence the primary route selection by setting the route preference value associated with a particular Next Top IP address.
In general, the default properties assigned to a static route apply to all the Next Top IP addresses configured for the static route. The default preference value for static route is five, which means if we have multiple Next Top IP addresses for the same destination, both the Next Top IP addresses will have the same default preference value, which is five. Using qualified Next Top, we can set the overall preference for a particular static route and then specify a different preference value for the qualified Next up. For example, if we have multiple Next Top IP addresses, one of them could have a preference value, which is the default, which is five, and the second Next Top IP address can be explicitly configured to have a preference value of seven. In this case, the one that has the value of five is the preferred route or the primary route. If the primary route fails, the traffic can be forwarded using the other Next Top IP address. We then spoke about dynamic routing protocols for large networks or networks that change frequently. Dynamic routing is a better choice or a preferred choice.
With dynamic routing, you can configure the network interfaces to participate in a routing protocol. Devices running routing protocols can dynamically learn routing information from each other. A collection of routers under a common administrative domain is known as an autonomous system. Routing protocols used for routing between autonomous systems, also known as inter autonomous system routing, are referred to as exterior gateway protocols. The example is BGP or border gateway protocol, while routing protocols used for routing inside an autonomous system, also known as intra autonomous system routing, are referred to as interior gateway protocols, or IGPs. We have examples like Rip, OSPF and so on. We then spoke about OSPF. It stands for open shortest path first. OSPF is an interior gateway protocol designed to be used within an autonomous system.
It uses something called as link state advertisements to send information about attached interfaces, metrics, and other variables. This information is used to compute the shortest path to each node. Autonomous systems can be divided into areas, and OSPF area is a logical group of routers. Routers with multiple interfaces can belong to multiple areas. These routers which belong to multiple areas are called as area, border routers, and to ensure correct routing knowledge and connectivity, OSPF maintains a special area called as the backbone area. This is represented as area zero zero all traffic must transit the backbone area. We then discussed about routing instances. A routing instance is a collection of routing tables, interfaces, and routing protocol information. Each routing instance has a unique name and a corresponding IP unicast table. Juno’s creates a default unicast routing instance called as the master routing instance.
By default, the master routing instance includes the inet zero routing table, which the device uses for IPV for unicast routing, and we also looked at the configuration for a routing instance. Well, that’s it for this section on routing fundamentals. I hope you enjoyed this section. In the next section, which is section seven, we’re going to understand about routing policies and firewall filters. We’ll look at some topics like default routing policies, import and export policies, policy structures, match criteria, types, and actions. We’ll also understand firewall filter concepts. It’s going to be an interesting one, I promise you that. If you have any questions about this section, please let me know in the discussions area. I’d like to thank you for watching, and I’ll catch you in the next section. Thank you.