Completing all three courses in the series will help prepare you to pass the related 65-question certification exam, JN0-102.
- Routing and forwarding tables
- Static and dynamic routing
- Routing policies
- Firewall filters
- Traffic policing
Skill Level Intermediate
- [Instructor] Hello and welcome back. In this section, we are gonna focus on routing fundamentals. And in this lecture, we're going to look at an introduction to routing. We'll understand the basic concepts of routing, let's begin. Let's look at a network topology. We have a router which has an IP address of 192.168.1.1. It is connected to a switch, and the switch is connected to two laptops, 192.168.1.10, and 192.168.1.11.
If the host at 192.168.1.10 wanted to send a packet over to the host at 192.168.1.11, the host would first send the packet over to the switch, the switch will look at the packet, the source and destination IP address, and realize that the destination host is on the same network. The packet will be sent out on the port on which the host is connected. This is a local area communication. Let's assume for a moment the host at 192.168.1.10 wanted to send a packet outside the local network, or in other words, outside 192.168.1.0/24.
In that case, 192.168.1.10 would first send the packet over to the router, which is 192.168.1.1. The router must now make a routing decision, and routing decisions are made using routing tables. Every router has a routing table which is used to make routing decisions. Considering the topology that we have on the screen, the routing table for the router at 192.168.1.1 would look like this.
For the destination 192.168.1.0/24, this is considered as a local network, or in other words, a directly connected network. If we wanted to send a packet to a remote network, we would have to update the routing table with the information for the remote network. Let's understand this on the next slide. Over here, we have two networks. The network on the left is 192.168.1.0/24, and the network on the right is 192.168.2.0/24.
Both the routers have a routing table. Their initial routing tables will look like this. The routing table for the router on the left has 192.168.1.0/24 as the locally connected network, and the router on the right hand side has 192.168.2.0/24 as the locally connected network. Let's say 192.168.1.10 wants to send a packet over to 192.168.2.10.
In that case, 192.168.1.10 will first send the packet over to 192.168.1.1, which is the router. The router looks at the routing table and finds no routing entry for the remote network. If we had to route the packet to the remote network, we would have to update the routing table with a routing entry that looks like this. For the destination 192.168.2.0/24, the next hop IP address should be 192.168.2.1, which is the router on the right hand side.
This type of a routing entry is known as a static routing entry, because we are adding this manually. With this routing information, the packet is now forwarded to 192.168.2.1, and it finally reaches the destination. Let's look at the same communication in the reverse direction. Let's say 192.168.2.10 wanted to send a packet over to 192.168.1.10. First, the packet would be sent to 192.168.2.1, the router looks at the routing table and realizes there is no routing entry to route the packet.
So in this case, we'd have to update the routing table with a routing entry that looks like this. For the destination 192.168.1.0/24, the next hop IP address is 192.168.1.1. With this routing information, the packet is sent to 192.168.1.1, and it finally reaches the destination, which is 192.168.1.10. Let's look at one more example.
In this example, we have three networks. 192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24. Each of the routers will have a default routing table that looks like this. For the router on the top, 192.168.1.0/24 is the locally connected network, and similarly, we have initial routing table entries for the remaining two routers.
If we wanted to send a packet from the 192.168.1.0/24 network to the 2.0 or the 3.0 network, we'd have to update the routing table. So the routing table has to look like this. We need to add a couple of static routing entries. For 192.168.2.0/24, the next hop IP address is 192.168.2.1. For 192.168.3.0/24, the next hop IP address is 192.168.3.1.
Both of these are static routing entries. Similarly, we would have to update the routing tables for the router on the left hand side, and for the router on the right hand side. As we can see from this example, static routing solves the problem of routing packets across networks. Let's look at some differences between static routing and dynamic routing. Let's start by talking about static routing. Static routing tables have to be created and updated manually, which means we as network administrators have to define the routes.
For full connectivity, a route must be configured for every network. The next one is very important. Static routing isn't fault tolerant, which means any changes on the network, like a link going down, is not detected and routes need to be changed manually. Static routing works well for small networks, but becomes an administrative overhead on large networks. Let's now talk about dynamic routing. Dynamic routing tables are created and updated by a routing protocol.
We just need to configure and activate the routing protocol, the routing tables are created automatically. Routing information is automatically shared between participating devices. Which means if we have multiple devices participating in routing, we just have to configure the routing protocol, they will exchange the information automatically. This provides fault tolerance. Changes on the network are detected automatically, and routes are adjusted.
Dynamic routing is easy to configure, and works well for large networks. Examples include Routing Information Protocol, RIP, Open Shortest Path First, OSPF, and so on. So that was an introduction to routing. I'd like to thank you for watching, I'll catch you in the next lecture, thank you.