Network Routing
Configuring Simple Static Route
Static Routes in Cisco Router
Now we will look at the simplest example to configure static routing given the network topology below. Take note that all IP addressing has been configured. So the only things left to do is to configure static routes.
There are a few check lists before we start the configurations:
(A) Is routing needed? — there are two routers in the network; and LAN1 →LAN2 is 1 hop away; so YES(B) Should we configure static route or dynamic route? — there are only two routers here; static route would give better performance since there is less network overhead; so Static Route it is!(C) How many static routes do we need to configure for full connectivity? Using the formula (2N-2); where N is 2, we know that we need to configure 2 static routes to connect LAN1 and LAN2. Remember, we need to set static route from LAN1->LAN2 and from LAN2->LAN1 (both ways) for full connectivity.
This is the syntax for static route in Cisco IOS. There are only 3 parameters needed.
ip route [destination network address] [destination network mask] [next hop IP]
Now we list out all the parameters correspond to each route.
Static Route#1
Parameters
===========
Where to configure? — Configured on Router0
Purpose: to go from LAN1 →LAN2
Destination Network Address: 172.16.1.0/24 (/24 is 255.255.255.0)
Next Hop IP: 10.1.1.2Static Route Command
=====================
ip route 172.16.1.0 255.255.255.0 10.1.1.2
Static Route#2
Parameters
===========
Where to configure? — Configured on Router1
Purpose: to go from LAN2 →LAN1
Destination Network Address: 192.168.1.0/24 (/24 is 255.255.255.0)
Next Hop IP: 10.1.1.1Static Route Command
=====================
ip route 192.168.1.0 255.255.255.0 10.1.1.1
What is ‘next hop’ explained
One of the useful trick to configure static IP is to spot the next hop of each route quickly. Remember that we need to specify the Next Hop IP as the third parameter in a static route.
Next Hop refers to the next adjacent router that the local router will forwards the packet to in order to reach the destination network. Next Hop IP is the IP address of the interface of this next hop router that is currently facing towards the local router.
We need to see this from the point of view of a router that we are currently configuring. We refers to this router as the local router. In our example, the local router is Router0; and the remote router is Router1.
Suppose that PC1 sends a packet to PC2. This packet will first go to Router0. Then, Router0 will forward it to the next hop router; which is Router1. This packet will arrive at the interface fa1/0 on Router1. Here, the next hop IP is the IP address assigned to the int fa1/0 on Router1 — that is 10.1.1.2.
Note: fa0/0 on Router_1 is not the next hop interface because it is facing towards the internal LAN.