Juniper JNCIA-Junos JN0-104 – Section 6: Routing Fundamentals Part 2
April 25, 2023

67. Routing and Forwarding tables

Let’s get to the Junos terminal and understand how to view the routing and the forwarding table. All right, I’m here at the terminal of a Junos device. As you can see, I’m in the operational mode to view the routing table. I’ll use the command show route. This shows me the routing table. Now, let’s spend some time to understand the details found in the routing table. The first information that we can see here is the routing table name, which is I net 0, which is the default IPv4 routing table in this routing table. We have routes for seven destinations and we have seven routes configured in this routing table. Off the seven routes, seven are in active state, 0 are in whole downstate and 0 are hidden. Let’s talk about this for a minute. The keyword active is used for routes used by the system to forward traffic. The keyword hole down is used for routes that are in a pending state before the system declares them as inactive. A hold down route was once the active route and is no longer the active route. And the key word hidden is used for routes that are not used because of a routing policy.

We’ve not talked about routing policy yet, but routing policies can be used to influence which routes can be imported or exported from the routing table. So if there is a route that cannot be used because of a routing policy, it will be marked as a hidden route. Back over here. So we now know the meaning for active hold down and hidden. If you see a plus symbol, that means it’s an active route. If you see a hyphen or a minus symbol, that means it was the last active route. And if you see an asterisk, that means it is both. So as we can see here, there’s an asterisk next to the route. That means it was the last active route. And it is also the currently active route. Moving on so we can see the destination prefixes over here. So these are the destinations that are connected using these routes. If you see 0.0.0.0/0, that’s a default route or a catch all route, meaning any traffic that does not match the routes that are provided here will be forwarded using the information associated with this route.

Over here, we can see the protocol by which the route was learned in this case. This route was learned using the static routing protocol. This one here is a directly connected network. The key word local means that it is a locally configured interface, Atrous, so you can see here. This is the interface address configured on that interface. And as a result of that configuration, this is the directly connected network on that interface. The same applies here. This is the address configured on this interface because that’s a local route. And as a result of that configuration, this is the directly connected network. Next, we have a preference value. We haven’t talked about preference values yet. We are going to talk about this in an upcoming video. But the preference value is used to determine which route should be preference. So let’s say we have two routes to the same destination learned from different routing protocols. In that case, which route should be used? Well, the one that has a better preference value will be used.

So the one that you see after the/is the preference value. Make a note that direct and local routes have the preference set to 0. We’ll talk more about this in an upcoming video. Then we have the time for which the route has been known, the format is weeks, days, hours, minutes and seconds. So this route here has been known for 0 hours. Thirty three minutes and 50 seconds. Then we can see an angle bracket here. The angle bracket means that it’s a selected route. The key word to indicate the next hop to the destination. So in this case, the next route to this destination, which is 0.0.0.0, is 10 . 0. Dark thirty . one. The key word, Vía, indicates the interface through which the destination can be reached. In this case, the destination can be reached using the interface. G is 0.0.0.0. So this is the next hop IP address. And this is the interface through which that address can be reached. Similarly here, this destination can be reached. We had this interface also notice we have the second routing table here, which is for IPv6 and it’s called a net six . 0.

The information we are viewing here is a brief information about the active entries in the routing table. It is also possible to view the routing information with the key word tours. So when I do show route question mark, you will notice we have the option called terse, which will show you the terse output. This is in a tabular format. Now, what if I wanted to know what is the route that will be used to reach a specific destination? In that case, we can do show route and then we can type in the host IP address. Let’s say I want to find out what route will be used to reach the destination for up to that. To that too. So we can say show route and the IP address and press enter and Junos will evaluate and tell you which is the route that will be used in this case. It will use the default crowd. We can also use the keyword protocol to view routes from a specific protocol only. So the command is show route protocol, question mark. And these are all the possible options that we can use.

We are going to use static because we have a statically configured route in the table. But notice that you can use other options as well, like you could do rip. You could do SPF, etc.. So let’s do a show route protocol static and now we can see that static route. We could also do show route protocol direct and that will show us all the directly connected networks. If you’d like to get more detailed information about the routing table, you could do show route detail and that will show you more information. Normally, you would not need so much of information. It’s usually for troubleshooting purposes only. And you also have show route extensive, which will show you all possible information related to the routing table. If you’d like to view the private and the internal routing tables, you could use the command show route all. And you’ll notice that we’re not only seeing eye net . 0, but we’re also looking at some private routing tables. These routing tables are not configured by the end user.

Another interesting command is show route, active path. This will show you all active routes for a specific destination. An active route is a route that is selected as the best path. So when you use the command show route, active path, it will not show you any inactive routes. Let’s now understand how to view the forwarding table. So far, we’ve been looking at the routing table based on the topics we understood earlier. We know that the routing table is used to populate a forwarding table. The way to view that is show route, forwarding table. And I’m going to press enter here. And as you can see, there’s so much information in here. Let’s take a look at this. So the first one is the name of the routing table, in this case, default . net. Then you have the address family. In this case, it is Internet protocol and it is abbreviated as Internet. If we go down here, we can see that we also have a routing table for the ISO family. So what we’re seeing here is the Atrous family, which is the IP address family. Then we can see the enable the protocols. Then we have the destination prefixes. We have the root type. We have the rude reference value, which is the number of routes that need to be referenced. We have the next top IP address. We have that next hop type. Then we have a software index value. The next hop reference value and the interface. This is the interface used to reach the next hop. Let’s look at the type of rout here. Notice that some of these routes have been marked as PRM.

Let’s talk about this. So we know that the command to view the forwarding table is show route forwarding table Junos colonel add some forwarding entries and considers them permanent in nature and they are shown with the type PRM. An example of this is the default forwarding entry, which matches all packets when no other matching entry exists. So let’s say you’re trying to forward a packet to a destination for which a route does not exist in the routing table or the forwarding table. In that case, Junos will use the default forwarding entry to match their traffic. When a packet matches the default forwarding entry, the router discards the packet and sends an ICMP destination unreachable, message back to the sender. So by default, if you’re trying to send a packet to a network for which a route does not exist, it will match the default forwarding entry because that’s like a catch all rule.

And the router will discard the packet. However, we can override this with a user defined default crowd. So if a user defined default throughout is configured, the router uses that instead of the permanent default forwarding entry. Let’s also talk about the rock types found in the forwarding table. We’ve already talked about PRM that indicates a permanent drought. And these are roots installed by the cardinal when the routing table initializes. We also have the ESD, which indicates a remote address directly reachable through an interface. If you see I a.f., that’s a route that has been installed as a result of configuring an interface. If you see user, these are routes installed by the routing protocol process or as a result of configuration. If you see I.D. D n, that’s a destination route for which the interface is unreachable. If you see IJI and ah, that means the Roud will be ignored. Back over here so we can see that a default shroud has been installed by the Junos colonel. It’s a permanent shroud and it is configured to reject the traffic. But we also have a user defined default crowd.

So in this case, that will override the Junos default entry. And we can also see the other rude types that we just discussed. Now, let’s talk about the next hop type. There are several different types of next hops. Let’s talk about them. The first next top type is UCSD. Which indicates a unique cast next hop. If you see B.C., S.D., that’s broadcast. If you see hold, that means the next top is waiting to be resolved into a unicast or multicast type. If you see LCL, that’s a local address off an interface. If you see I ndr, that’s an indirect next hop IP address. If you see DCD, that means the packet will be dropped silently without sending an ICMP unreachable message. If you see our GCT, that means the packet will be discarded and an ICMP unreachable message will be sent. There are other types of next hops as well, but these are the most important ones that we should know. Back over here. So we now know the next hop types that we see in this table. The forwarding table also allows you to view detailed information so we could do show Roud forwarding table. And then we can see say detail. And that will show us detailed information. And if we want to know even more information, we could say, sure, route forwarding table extensive.

Keep in mind that the forwarding table that we’re looking at right now is from the routing engine, as we know that the routing table is populated using the route information from different protocols. The routing table is then used to populate the primary forwarding table, which is done on the routing engine. And then the forwarding table is copied over to the packet forwarding engine. The forwarding table that we are looking at right now using this command is the forwarding table on the routing engine. We can also view the forwarding table that’s copied on the packet forwarding engine and the command to do that is show PFG. Show packet forwarding, engine question mark. And now we can use the Keywood route. Show PFG route. And then the Atrous family, in this case, IP for IPv4 routing table show PFG Routt IP. And that will show us the forwarding table from the packet forwarding engine.

68. Route Preference

Let’s not talk about route preference. Let’s start with a scenario. Let’s say we have a router. This is router eight. And this router needs two forward packets to the Internet. There are two ways in which this router can do this. It can forward packets to router B. And from there, it can go to the Internet or it can forward packets to router or C. And from there, go to the Internet. Now, let’s say this router is configured to use the rip routing protocol. It has learned a route from the rip routing protocol that looks like this. The destination is 0/0, which means that’s the default froud. It has been learned using the RIP routing protocol and the next hop IP address is router B. Now, let’s say USA network administrator, you did or mine that going to the Internet via router C is the better option. So you add an entry to the routing table that looks like this same destination, 0/0. This time it’s a statically configured route. And the next top IP address is router C. So in this case, which route should router A use? They are both for the same destination. They are learned using different protocols and provide different next hops to address this problem. We have a value called as route preference. Let’s talk about it.

So Junos assigns a default preference value to each route that the routing table receives. This is same as administrative distance on equipment from other vendors. If you worked on equipment from other vendors, you may have come across this term as administrative distance. The same thing in Junos is called s preference value. The default preference value of a route depends on the source of the route. The range for this is from 0 to four billion. Two hundred and ninety four million, nine hundred and sixty seven thousand two hundred and ninety five, which is to power 32 minus one. An important thing to keep in mind is that a lower value indicates a more preferred route. So if a route has a preference value of five and another route has a preference value of 10, the route that has the preference value of five will be preferred because a lower value indicates a more preferred route.

On this table, I have the default preference values for some of the most common routing information sources. If you have a directly connected route, the default preference value is 0. The same preference applies for a local route, which is the result of configuring an interface so direct and local routes have a preference of 0 static routes, have a preference of five. Oh, SPF internal routes have a preference of 10 rep or routing information protocol has a preference value of one hundred and Border Gateway Protocol or BGP has a preference value of one hundred and seventy. There are many routing protocols through which Junos can learn a route. But these are the most common ones that we’re likely to use. Some more key points to keep in mind the default preference value for most routing information sources can be modified to make them more or less desirable.

The exception to this is direct or local roots. These are always preferred, regardless of the modified route preference associated with other routing information sources. So this is very important to keep in mind that direct or local routes will always be preferred. If there exists multiple equal cost pads for the same destination, the routing protocol daemon will randomly select one of the available pats. So this is another important thing to keep in mind. If there are multiple routes available for the same destination and they are equal cost pats. In that case, the Junos device will randomly select one of the available pats. This approach provides low distribution among the Pats.

69. Static Routing – Part 1

Let’s now understand how to configure static routing. Roots that are permanent fixtures in the routing and forwarding tables are often configured as static roots. These roots generally do not change and are not manipulated by external routing protocols. To create a static route in the routing table, you must at minimum define the route as static, defined that network. You want a route to an associate, a next hop IP address with it. So there’s three elements that we need to configure. We need to define the route as a static route. We need to provide the destination address. And we also need to provide a next hop IP address that will be used to reach the destination. An important thing to keep in mind is that the static route is inserted into the forwarding table when the next hop IP address is reachable. If the next top IP address is not reachable, the route will not be inserted into the forwarding table. All traffic destined for the static route is transmitted to the next hop IP address. Let’s understand this with a diagram on the screen now. I have three routers, router one, router two and router three. Here’s the IP addresses associated with the routers.

So router one is one 90 to 168. One . one router two is one ninety to 168. One . two. And it also has another interface, which is one ninety two 168, one . eleven. And router three is one ninety two 168.one . twelve on router two. I have a connected network which is one ninety to 168.2.0/twenty four on router three. We have a connected network which is 190 to 160 at 3.0/twenty four. Let’s say router one wants to send a packet to the network. One ninety to 168.2.0/twenty four to make this happen. We would have to configure a static route on router one, which points to that network and provides a next hop IP address. The route will look like this. The destination is one ninety to 168.2.0/twenty four. This is going to be a statically configured route. And the next hop IP address will be the router that knows how to route this packet to the destination. In this case, one 90 to 168, one . two.

Similarly, if we wanted to route a packet to the network one nine to 168.3.0/twenty four. We’ll also need to add a route for that. Now, let’s get to the terminal and understand how to configure a static route. All right, I’m here at the Junos terminal. I’ll first enter the configuration mode with the edit come in and the configuration of a static route is done under the edit routing options I Iraqi edit routing options. The command is set static. Let’s do a question mark here. The key word is root. So we’ll say sex static root. And now we need to provide the destination for which we’d like to add a route. I’m gonna say one 90 to 160 at 1.0/twenty four. Although a question mark here, and you’ll notice we have a lot of options that we can provide. Right now, we’re going to use this option here, which is next top, and that’s used to configure the next top to the destination. So the keyword is next hop. Let’s do a question mark. And now we can provide the next hop IP address. I’m going to say 10 . one. . one, . one. I’ll press enter and do a commit. Now, the command to view the routing table is show route from the operational mode, but will do it from the configuration mode by prefixing it with the run keyword.

So we’ll say run show route. And we can see all the routes configured in the routing table. Do you notice that our route is actually missing? We configured a route for one 90 to 160 at 1.0/24. We don’t see that route over here. What do you think is the reason for this? Well, the reason is that the next hop IP address is not a reachable IP address. I know that in my network there is nothing called ten one one one since the next top IP address is not reachable. The route is not installed over here. Let’s change that. I’m going to first delete that route. Also delete static. And now if I do a show. We can see that we do not have a static route. Let’s reconfigure the route with a different next top IP address. So also said static route. The destination will remain the same one 90 to 168, one . 0./twenty four. Next hop. And this time I’m going to provide an IP address that is reachable 10 0, 20, 50. I know a device like that exists in my network. I’ll press enter. I’ll do a commit. And now let’s do run show route. And now we can see that the route has been installed in the routing table. So we can see that this is the destination we tried to configure. It’s a static route. It has an associated preference value. This is how long the route has been known. The key were to indicate the next top IP address and this can be reached via the interface. G e0 0 1.0.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!