Static versus dynamic routing

Static versus dynamic routing

  • Filed Under:
  • 13 February 2012

Static versus dynamic routing.
A router requires a ROUTE to a remote network if it is to send traffic there.
A route specifies how the network can be reached.
Routes are stored in a route table.
The route table can consist of static, dynamic or a combination of routes.
We can examine the route table by issuing the show ip route command.
In static routing the route table is constructed manually by the router programmer.
In dynamic routing the route table is learnt by the router itself.
There are advantages and disadvantages to each method.

Static routing.
Static routing means it doesn’t change.
-in other words if a route is to exist we have to program it into the router
-if a route goes down the router cannot find a way of routing around the problem
-this means a lot of work for the programmer in a larger inter-network since they will haveto program routes to ALL networks in manually
Static routing though is very efficient
-does not increase overheads on WAN lines as there is no need to deploy route table updates to other routes
Static routes could be considered more secure than dynamic ones
-since only networks given routes in the route table can be reached, access to network segments can be restricted.
Static routing is recommended when:
-a network is reachable in one router hop
-or when there is only one route to a network
This is so that the overhead of broadcasts produced by dynamic routing protocols is reduced
To configure a static route we use :-
Ip route


Router A needs to send jobs to router B’s S0 interface in order to reach network 192.0.3.0.
Our command therefor is:-
Ip route
Ip route 192.0.3.0 255.255.255.0 192.0.2.2


We have now added a new network section.
We could add another static route on router A so we have a route to each remote network, or we could add a gateway of last resort (default route)
To add a default route we modify the ip route command to
Ip route 0.0.0.0 0.0.0.0

Default route
A default route simply specifies what a router should do with packets for networks it does not have routes to
In our example I could configure the default route to point to 192.0.2.2 this means I wouldn’t have to configure routes to all remote networks on router A
Router A sends any packets to router B which is then responsible for forwarding them to the final destination

Static routing
If static routing is being used it is advisable to add the ip classless command to the configuration
This allows the router to route packets onto its directly connected networks without the need to configure routes to them all
This saves a significant amount of effort

Testing static routes
There are a number of ways that we can test statically assigned routes:-
-Show ip route – displays routes in the route table and the connected networks
-Ping – sends a packet to the remote host and waits for a response
-Trace - lists the routers a packet travels through in order to reach its destination

Dynamic routing
Dynamic routing means that the router can change without the need for human intervention
Routing protocols are used to learn about routes through the inter-network
This means that new network segments can be added without the need for lengthy reconfiguration
If a route goes down for some reason an alternative route can automatically be utilised
The problem is the overheads required by dynamic routing:-
-WAN links have to carry route table update broadcasts as well as data
-The router requires more processing power and memory
-There are different types of algorithm used by dynamic routing protocols. We are going to concentrate on the distance vector algorithm
-An algorithm defines how the router gets information about the network. Some are more efficient than others

Distance-Vector routing
The distance-vector algorithm is a simple technology that can be deployed in dynamic routing
Routing protocols such as routing information protocol (RIP) use this algorithm
It essentially describes the manner by which routers learn paths through the inter-network
In a system based on the distance-vector algorithm the following occurs:-
-At power on the router will determine any other routers connected to its interfaces
-This information is then stored in the route table
-Every 30-90 seconds (depends on routing protocol) the route table is broadcast to neighbouring routers
-The update received on the remote router will be examined and any new information will be added to its own route tables
-If a new route has been discovered to a network already known to the router it will calculate the best route to that network
-to do this it utilises something known as the metric
-in the case of RIP this is the number of hops to the destination LAN


Since distance-vector determines the best route as the one with the minimum number of hops the route across the 56k line will be chosen
This is not the best choice as it is slow. It would be faster to send data to router C and then on to router B via the 1MB links
In this instance we would need to manually edit the metric

There are other issues involved with distance-vector based protocols. We will examine these in more details when we look at RIP
For the record they are:-
-Convergence
-Routing loops
-Split horizon
-Route poisoning
-Hold downs

Dynamic routing is deployed in large inter-networks
Easier to set up and manage
Routers can find their own work-a-rounds for down routes
REDUCES efficiency of WAN links
Takes a while for the routers to learn the links
Higher processing and memory requirements within the router.

Comments

blog comments powered by Disqus
The Lenovo ThinkPad T500