In computer networks, routing can be done with two methods. One of them is Static Routing and the other is Dynamic Routing. Static routing is the manual method of routing and Dynamic routing is the routing that is done with the help of Routing Protocols. In static routes the administrative distance is as default value. There is also another staatic routes called floating static routes that we can change administrative distance of this routes.
In Static routing, we can enter all the routes manually to the router. In other words, we can define each routing steps one by one. To access a network, which nodes we need to pass through, we can define such steps. This work is not an easy work, so static routing is used in small networks. Beside, in large networks, static routing is also used beside dynamic routing. Think about it, defining all the routes in a large network, isn’t it a very difficult job?
To configure a static route, we use three parameters. These parameters are given below:
Here, Destination Network IP Address shows the ip address of our destination network and Destination Subnet Mask shows the destination network’s subnet mask.
For the last parameter, we have two different ways. If we use Next Hop IP address, this shows the router that the traffic will go after our router. Here, we use the interface IP address of the router that we will pass through on the way to the destination.
If we use exit interface, we define the interface that we will use to go through the destination interface. This exit interface is one of the interface of our router.
Let’s give an example and understand static routing better. In the below topology, there are three routers and two networks. The end routers are directly connected to only one network, so they do not know the other network. So, with static routes, we need to teach the other network to each of them on both routers. So, we will configure static routes on Router A and RouterC.
Router A do not know 126.96.36.199/24 network and Router C do not know 10.10.10.0/24 network. So, we will configure static routers through these networks.
As you can see above, to write a static route, firstly we will define the network that we would like to go and then we will write subnet mask of this network. And lastly, we will define the next hop interface or the exit interface of the router.
So, why we configure static routes in both directions? Because the end routers do not know the other network and the static routes are unidirectional routes. If we want a communication between Router A and Router C, we should configure static routes on both routers.
There are different routes in a routing table of the router. These routes are showed with different letters. The directly connected networks are showed with C, the static routes are shoed with S on cisco routers.
Static Routes are the most trustfull routes after directly connected interfaces for Cisco devices. So, the administrative distance of static routes is 1. This means that, if for a destination we have both a static route and a router learned by a routing protocol, always static route is selected. The default administrative distance of a static route can also be changed.
Leave a Reply