Static Route:


understandingStaticRoute


When do you need to add a manual route (static route) to a router?
Please see above diagram:
Static Route:
You only add static route, if that network is not list in the Routing Table.
If you use a routing protocol. You don’t have to manually create a route.
Unless that network doesn’t connect to the router’s interfaces. Then router doesn’t know about it, this is when you add a static route to the Routing table.
is to manually create a Routing Table list, on how to get to the other routers (networks, subnet).
Let say, we forgot to advertise or add a network statement to that network for the network for Tustin interfaces: int f1/1 and g3/0
If you didn’t included that network into the Network Statement, it will not show up in  routing table. The router doesn’t know it, because it is not list in the routing table list: Show IP route
Conf t
router rip
Network x.x.x.x
The starting point is from 1 to destination at culver-city-router.  Router can only see its neighbor router directly link. Any network beyond you’ll need to create static route as mark in pink. In Blue is how far it can see from it staring point 1.
Like in protocol BGP,  router can only see its next door neighbor, meaning the two router has a local link direct into each other, then it can see each other route table. You’ll be able to ping fine.
What if there is another router beyond the neighbor? You will need to add a Static Route which is tell a router on how to get to that network destination.
Or you can do router table Redistribution, mean to send over the route table to its neighbor.


What is a Route?
All it is saying to get to that network is to use what router?
Another word what router has that network (subnet) setup on it.
You can look at that Router routing table (show ip route).
If there is no route setup in that router, then that router will not know how to get to it.
Each interfaces on a Router represent one network link into another Router.


What is a Default Gateway? 
In a Switch this is how a VLAN able to get to another VLAN. A default gateway is the router, route between VLAN (network).


What is a Default Route?
0.0.0.0 0.0.0.0
When a router done looking at its own table and can’t find that network destination in list in its routing table. A Default Route is telling that router to connect to that router to get those network that is not in its routing table. (It is the Router next hop router to default to or to use that particular router, because that router can connect to that network.)


Static Route: again is a manually creating a route table, to connect to another network (remote router network interfaces). Route/path to it do not change.

Static Route: will not tell you if a connect routers has gone down in the middle of the day. But automatics router protocol like: RIP, EIGRP, OSPF, BGP will generate a log alert message, if that router had gone down. This is maybe a good benefit to use router protocols.”
ping failed: when you have route in one routerA, but the other routerB doesn’t have a route back to routerA. You’ll need to add a Static Route on that other routerB about how to get to routerA. 

-A switch forward traffic within vlan (network), it can’t forward into another vlan.
-A router can forward traffic between network, and a router will drop the packet at itself if it can not find the destination. While a switch will send it out to all other switch.
(Router: interface is neither a GigaBitEthernet and Serial link interface.
Switch: interface can be Ethernet, FastEthernet, GigaBitEthernet.)


Default Route: is the 0.0.0.0 0.0.0.0 when the router can’t find that network that is not list in its routing table. It has to connect to that router to get to that network.  Is the router next hop to get out to look for that external network.
LAN-Router1 <——> LAN-ROUTER2<—-> ISP-router.
You will setup the LAN-router2 to have a Default Route 0.0.0.0 0.0.0.0 to the ISP router (next hop router) to get to the google because google is on the ISP-Router link.


-You can think like this, that Router interface that is link into that switch interface, or into another router interface, both interface are connected and link together and this is one network (subnet link) another word, its form one network!
(Router interface may assign with IP address 192.168.1.1 and while the Switch vlan IP (network address) is: 192.168.1.2). Its form one network! They are on same network and that mean the switch and router can communicate. No direct link, you have to use static route to tell the router, if routing protocol not used and redistribution not setup.
-So if a router has another interface not directly connect, that mean it is on another network.


Router protocol: like OSFP (any company), EIGRP (Cisco device), BGP (use in ISP).
A protocol job is to find out all the network existed in a form of neighbor router (router that is next to it) and it will create an automatic route to get to that router and alert message when there is a problem with the network interfaces.



Lets go over some of the commands and its
explanation:

sho  ip  router
-Show a route table, a route that has letter marking like: C,L, is an automatic route created because there is direct interface link between the two devices.
-no marking it is just information, not a route! and some route are created by router protocol(BGP, or OSPF)
C: that is the available network and connected with L interface below.
L: the actual interface of the router that connect to that network.
It make sense, because each interface represent a single network link. 

———————
sho ip int br 
sho ip int g0/0



Let take a look at subnet mask:

172.16.1
./24
255.255.255.0
possible address range of IP can be change from 0-255 when \24 is indicate.
All of that network IP address range can use. This subnet mask normally use to assign to VLAN and PC subnet.
———————
1.1.1.1  /32
255.255.255.255
with /32 because, it has only 1 ip address. This subnet mask is assigned to Loopback interface of a router, because only 1 IP address network. Basically use as to identify the router devices is Offline or not.



You can see all the subnet graph >: Subnet Mask Cheat Sheet



What is Dynamic route
: its automatically created when we assigned an Interface with IP address on that router, and when you enable a Router Protocol setup.
Router can only see its own interface and the link out next to the neighbor router only.
It can not see router over its neighbor.  And it can not created dynamic route for it, because it has no direct connect link line plug into it.

-To get to the other router that is not with in our network. We have to manually adding a static route: when you do: sho ip route 
You will info about the road (route of that router).
S mean static.



More info about adding a manual static route:
because router can only see adjacent router and the same setup of the other routers. It will create a route automatically and you will C L indicator next to automatic route, and also the protocol route like O for ospf protocol:
sh ip route

-What about the next router over there that do not run the same router confiruation or setup. Again we can create static route by manually enter the route into each router on how to get that network.



How to
add Static Route:
When you add a manual route, it is call a Static Route to allow connection into that remote router. If you can’t connect to it (can’t ping it).
-Step 1: You want to check the route to see if correct.
Step 2: If it is correct then check the next hop router ip route to see if can get to that remote destination.
step 3: If it can’t then you need to add a static route to both of the router and then try to ping again.

This is the explanation of statement of adding a static route:
ip route   destination-network        destination-mask         interface-IP-of-the-adjacent

Add ip route by the next hop connect Interface Name:
conf t 
ip route    172.16.100.0                        255.255.255.0                 g4/0

or add ip route by the next hop connect Interface IP address:

ip route    172.16.100.0                         255.255.255.0                172.20.0.66
——————————————– 

Another way of adding ip route technique:

ip route    192.168.4.0                             255.255.255.0       null   0     88



To deleted a route:

no ip route   172.16.100.0     255.255.255.0





OK, before going any further let try to understand info of the command of:
show ip route

1ready sho ip route explain 1



indicate one subnet and connect directly to L interface.
L  is the actual IP address assigned to the interface.
C L: together form a port out/in of that router or a  network route to the router.



S : is a Static Route
 that you created manually and the interface is responsible to get to
the destination network route. It’s the next hop (router interface direct connected link).
-As you can see GigabitEthernet3/0 is responsible to link out to two network:
172.16.111.0/24
172.16.112.0/24

-And GigabitEthernet4/0 is responsible to link out to one network:
172.16.100.0/24
——————————————–
And this static route was created by using the Interface-name:
Please look at the g3/0 at the diagram to see more info.
Basically g3/0 is connecting into another router that has path into network:  172.16.111.0 and 172.16.112.0
conf t 
ip route  172.16.111.0             255.255.255.0                g3/0
ip route  172.16.112.0             255.255.255.0                g3/0

-While g4/0 is link out into another router that has path into network: 172.16.100.0 
ip route  172.16.100.0             255.255.255.0                g4/0



How to crate a Static Route
: manually create route, if you a small network and has only 3 router. It is better to create the route manually,  because when you enable Router protocol or anything,  it will create another problem for you to solve later.
An adjacent router is a directly line link between the two router.
——————Diagram———–
RouterA <–1.57–Link adjacent—1.58> RouterB >—-notAdjacentToRouterA—>RouterC

Example: for RouterA to get to RouterC network of: 172.16.1.0
RouterA is adjacent to RouterB.
RouterB interface link back to RouterA ip address: 172.20.1.58
—————–
conf t
ip route  172.16.1.0    255.255.255.0     172.20.1.58



Automatic Route: create is when you enable a router protocol:
It will automatic create route to each router automatically:
Router protocol like: RIP, OSPF, Eigrp or BGP protocol
The OSPF will work with any router manufacture.
While Eigrp only use on Cisco router.
The BGP is use for very large network like ISP and will work with any router.
RIP is no longer in use today. RIPv2 is still use in smaller network.


The show command:
sho ip pro
show ip route
show ip route bgp
show run | b bgp


Published by

Khmer Certified

Welcome to Khmer Certified. We're all about sharing the experienced in Information Technology. Our site is not an introduction to computer. We are more about sharing your journey that may take to get a job in an entry level IT - your first year in IT field

Leave a comment