Networking Concepts: Static Routing Protocol
Static Routing is a process in which a network admin will configure the other network’s information manually. Since we already know about different routing protocols, let’s learn about Static Routing in details.
Why use Static Routing?
AD Value of Static Routing is 1 that means it is most reliable protocol available for routing after Directly Connected networks (AD=0). It is also easy to implement in comparison to other routing protocols but only in a small network. If network is large, it is hard to configure and manage if Static Routing is running. We will check that in configuration part.
Configuring Static Routes
There are a few concepts that one should keep in mind while configuring a static route. Concepts like number of Indirectly connected network, Next hop address, exit interface and use of ad value. To configure first we have to assign IP addresses to router interfaces and hosts. After that, we will go to configuration mode of router ans use ip route <destination network> <destination subnet mask> <next hop address or exit interface>.
To understand it better, lets take a topology for example,
In this topology, there are three networks (10, 11 and 184.108.40.206 /24). Now, by default router only knows directly connected networks so Router 1 only knows 10.0.0.0 and 220.127.116.11. It has no idea about 18.104.22.168 and same with Router 2. It only knows 22.214.171.124 and 126.96.36.199. If we want to send a packet from PC-1 to PC-2, it is not possible because when packet reaches to Router 1, it will check it’s routing table. Since there is no information on how to reach to 188.8.131.52 (PC 2), it will drop the packet.
To avoid this we use Routing. To configure Static Routing, we will come to configuration mode of Router 1 and use ip route <destination network> <destination subnet mask> <next hop address or exit interface>. In our case it will be ip route 184.108.40.206 255.255.255.0 220.127.116.11. Here 18.104.22.168 is IP address of se 2/0 interface of Router 2. It is called next hop address. We can also use ip route 22.214.171.124 255.255.255.0 se 2/0. Here se 2/0 is interface number of Router 1. It is called exit interface (From which interface packet is going out)
That is only 1 command because there is only one Indirectly Connected network. If there are more than one network, we have to give information of all the indirectly connected network on each router. Watch the following Video for detailed information.
Path Selection in Static Routing
If a router has more than one path to reach to the destination, it is its’ responsibility to select the best path. Router will select the path with better AD value and by better I mean less AD. We can do path selection in Static Routing with the help of next hope address or exit interface. Consider the following topology for example,We are at PC 1 and want to send some data to PC 2. We have 2 paths for that, either via 126.96.36.199 or via 188.8.131.52. Now when configuring static routing, if we use 184.108.40.206 as next hop address packet will be forwarded via upper path and if we use 220.127.116.11, packet will be forwarded via lower path. Similarly if we are using exit interface, if we use se 2/0, packet will be sent via upper path and on configuring se 3/0, packet will be forwarded via lower path. That is how we can configure path selection in static routing.
Using of AD value
We can also use ip route <destination network> <destination subnet mask> <next hop address or exit interface> <AD Value> for configuring AD Value for specific route. Changing AD from 1 to >1 will make that path less reliable in compare to other. Take a look,Here we have multiple paths, if we want use command ip route 18.104.22.168 255.255.255.0 22.214.171.124 10 at router 1, upper path will no longer be the best path from PC-1 to PC-2. It will be used as backup instead. If lower path fails then only upper path will be considered. Changing AD Value to 255 will make the path completely unreliable and that path will not be installed in Routing Table… ever. So use AD carefully.