Welcome to part four of the Introduction to Juniper Series,
which is all about routing.
We're starting right here with the routing table
We often talk about the routing table like this only one.
The truth is there are several routing tables in journals.
The main routing table is for IPv4 unique cost routes
and is named in net dot zero.
There is also a routing table for IPv6 unique cost routes
called INET 6.0 On top of that, we can create our own
IPv4 and IPv6 routing tables, which we'll see in detail in video 19.
But it doesn't end there.
There are several other routing tables built into each layer three Junos Device.
These are used for features like multicast, policy based forwarding
and MPLS.
Those features are a little out of scope for this series.
We can take a look at the
net zero routing table with show route.
This gives us all the usual details you would expect from a routing table,
except perhaps formatted a little differently.
Over on the left, we have the network
and its mask inside a notation
next to that, and we have the source that the route was learned
from, along with a number called the route preference.
In this case, the source is static but
this could also be opf, BGP and so on.
We'll talk about the route preference in the next video.
Over on the right is the next type IP address
and the egress interface that is used to reach it.
If that seems a little overwhelming, we can use show route turns.
The column is used to indicate if this route is active.
That is if this route is installed in the forwarding table.
The V column is used with BGP.
A question mark simple here means that the route was not learned through BGP.
The P column is the protocol code.
This is how the route was learned, such as static or SBF or whatever
and of course there's the next top IP address.
If we want to find which route will be used for a particular
IP address, use show route to us along with the IP we want to reach.
June also will show us the route that will be used.
We've talked about the routing table being separate from the forwarding table
valid routes going to the routing table
and the best routes are selected for the following table.
That means that if we have two identical routes to the same destination, meaning
that one is not better than the other, they will both go into the routing table.
However, even though they may be the same, only
one selected at random will be installed into the forwarding table.
This is different to other vendors
that actively use both rounds in a process called ICMP or equal cost.
Multiple path routing At least that's a default behavior.
We can define a policy that will allow ICMP.
We look at route policies in VOA. 18.
In the forwarding table we can see the destination network.
We can see the next top, which could be an IP address or a MAC address.
There's the type which will be something like unique
AST broadcast to multicast or local.
And we can see the egress interface, which may be physical or it may be virtual.
Further down the table, we can see to addresses listed as well.
The floating table is not just full routes, as you can see.
The important part to notice is the egress interface.
This has given us the opportunity to really see
the split between the routing table and the forwarding table.
If you're not comfortable with this yet, I recommend reviewing this again
until you're happy.
That is making sense.
Let's get back into the configuration now and create a static route of our own.
This is done under the routing options hierarchy
I'm going to configure a default route.
We set up the destination network first, then we had the next hop.
It's that simple.
Nothing fancy.
After that's committed,
we can see this route in the routing table.
When we test with ping,
we can see that we have access to the Internet
Static rack configuration
also allows for adding multiple next hops.
These are config for the route that we looked at earlier.
You can see the next hops in the list
as shown with square brackets
If there's a problem
with one of our routes, it may become a hidden route.
This might happen, for example, if we have configured a routing policy
to reject some routes that we've learned through a routing protocol.
Hidden routes are still known by the router but are not used.
We can see a list of hidden routes.
If we have any with show about it.
So if routes are not
showing up in your routing table and you can't figure out why, check
if they listen. It's hidden
Now, here's a neat trick.
If you want to remove the study group from the routing table,
we can deactivate it rather than deleting it.
There will still
existing configuration, but it will be listed as inactive.
It won't appear in the routing table at all,
not even as a hidden route
This is great for troubleshooting or as a temporary change
as we can quickly activate it again when we're ready.
In fact, I'll reactivate it now.
Now we all know that
the next top IP for any route needs to be in a local subnet.
Right?
Are you sure
this doesn't seem to be common knowledge,
but it is possible to put a next top IP in a remote subnet.
This is not unique to Juniper.
Lots of vendors support this.
In this config, I'm adding a route with the next hop of ten,
15, eight, seven.
This is not in the subnet that's connected to my router,
so it's not surprising that the route does not appear in the routing table
is just invalid.
Now I'm going to update my configuration
to add the resolve keyword
looking at the routing table now we get a different result.
The route is now valid, but it has a different next top than the one
we configured We have configured a feature called Next Top Resolution.
This is where Junos uses the routing table to find the next top to get to ten,
15, eight, seven Our route is an updated with the new next top.
This is something you might want to practice with in the lab.
In past you may have configured a null route
The example shown is for a Cisco EOS router.
The two main uses for this type of config is to direct traffic
into a black hole and to manually summarize routes.
We can do the
same thing in Junos, although the approach is different.
In fact, there are two ways this can be done.
The first is to configure a discard route.
This is a regular static route, but with discard as the next hop,
any packets using this route will be solidly dropped.
The second way is to configure a reject route.
This follows the same principle.
The difference between them is the behavior when the package is dropped.
Genius will generate a nice error message
and send it back to the source of the drop packet.
When we look at the routing table, these routes simply show as reject
or discard
We can't talk about routing tables
without mentioning reverse path forwarding.
This is a method of determining if a packet is valid
or if perhaps it is coming from an attacker.
This is the logic behind reverse path.
41 A packet arrives at the router
to the router, looks at the packets, source IP
and three Dorado looks at the routing table
to see if there is a valid route to that source IP.
If there is a valid route, the packet will be forwarded as normal.
If there is not a valid route, the packet will be dropped.
The reasoning behind this is that
there are some attacks that used forged IP addresses.
If traffic is coming from an invalid source, then it has likely been forged.
This is just one way in which we can improve our security posture.
RPF operates in one of two modes
strict mode or lose mode when operating in loose mode.
The source IP of a packet must exist
in the routing table as long as the root is there.
There is no problem and the packet is allowed
in strict mode.
The source IP of the packet must be in the routing table
and the packet must be received on
the interface that's used in the route
Do you think strict mode sounds better?
Sometimes it is, but is definitely not.
In cases where you have asymmetric traffic,
that's when traffic might leave on one the face but return on another.
So if asymmetric traffic is normal in your environment, plus mode is better.
If symmetric traffic is normal, strict mode is better.
The quizzes are really getting more interesting now.
I'm sure you'll agree.
A lot of this is covered in more depth in the lab that goes along with this video,
which is available on the members section of the website.
In particular, we get to see RPF in action.
What happens
if there's competing routes to go into the routing table?
These are selected using the route preference,
which you might know as administrative distance.
Click the video shown here to learn about route
preference as well as qualified next hops.