Static Vs Dynamic Routing
Static Vs Dynamic Routing
Static Routing:
Static Routes:
So, with static routes you as the administrator are adding the routes to the routing
table.
The advantage of this method is that there is no overhead on the network. In that
there are no keep alive or constant routing updates saved between routers. RIP or
Routing Information Protocol which is an older routing protocol sends its entire
routing table every 30 seconds.
So, when using static routes rather than RIP that overhead is removed. More modern
routing protocols such as EIGRP and OSPF remove this constant updating that took
place in RIP every 30 seconds. But they still send “Hellos” and “keep a lives” on the
network which consume bandwidth.
With static routes that is removed. But the major disadvantage of static routes is
that you as the administrator have to update the routing table, which could be a lot
of work if you have a large network. Static routes do not automatically take into
account changes in the network.
You as the administrator would have to manually update the routing table on a
router or multiple routers if a link went down. So, the overhead is not on the
network. The overhead is on you as the administrator to keep everything updated.
Static routes do not scale when networks become large, the amount of work
involved in keeping routing tables updated manually is just too great, especially
when there are lots of topology changes.
Static routes do not update routing tables when a topology changes in most cases.
Now that being said it is possible, these days to monitor IP addresses and for
example to remove a route from the routing table. If an IP address is no longer
available.
So, it's possible to implement some dynamic options with static routes but the
overhead is still large and static routes are cumbersome in large networks.
Now static routes are still used in a lot of networks today. The most common
example is a default static route. Your home ADSL or cable or fiber Router will
typically have a default route to your service provider. So, your home router doesn't
know about the routes on the Internet. It simply forwards the traffic to your ISP.
A default route in a router is routing table basically tells the Router when you don't
have a specific network for traffic that you receive in your routing table. Simply send
the packets to the router that's configured as your default gateway or gateway of
last resort.
So, when you configure a default route on a router, you are pointing it to another
router which means that router will simply send the traffic to that default gateway
when it doesn't have a more specific route in the routing table.
if I type ipconfig I can see my PCs IP address and I can see the default gateway
my PC will send traffic to the default gateway, for any IP addresses not in the 192.168.56.0
subnet.
so, as an example, if I ping google.com that traffic is going via my default gateway
here’s a Cisco router that I’ve got in my lab. And if I type the command sh ip route. I can see
the routing table of the router. The router has directly connected networks. “C” is directly
connected networks
as an example, 192.168.56.0/24 is directly connected on this interface F0/0.
So, if I ping 192.168.56.1, that traffic is going to be sent out F0/0 because that network is
directly connected to this interface. Packets will traffic to 192.168.58.0 will be forwarded out
of interface 0/1
notice this route S and * (S*). This is a candidate default route. In other words, this (0.0.0.0/0)
static route is the default route that a router gonna use.
If I look at the running configuration of this router and then include only lines that have IP
route in them. I can see this command was added to the router
so, I type IP route 0.0.0.0 0.0.0.0 and then 192.168.56.1. This portion is saying that we are
adding a default route to the IP routing table of the router with the gateway of last resort
being 192.168.56.1. so basically, this router will forward traffic to 192.168.56.1 for any
networks not in its routing table.
we can see that by using the traceroute command. So, let's trace route to Google.com
notice the first hop is 192.168.56.1, the local gateway of last resort
traffic is then sent out into the internet to get to google.com. so, my traffic is being
forwarded from router to router until it gets to 216.58.213.100
This star or * indicates that the router is not replying back to the ICMP messages sent to it.
So ICMP maybe drop as an example. But the point to take note of
is based on the IP routing table on this router, the gateway of last resort or the default
gateway is 192.168.56.1. This static route (0.0.0.0/0) has been added to the routing table
Here’s my router at home. This is the 192.168.56.1 router that’s my Cisco router had as it's
default gateway
and this router will also have a default gateway connecting it to the Internet. So, I'll login. if I
look at the broadband connection
notice my local router has this IP address and the default gateway is set to this IP address,
primary DNS and secondary DNS are set to these values, so my home broadband router or
DSL router has its own default gateway.
This Cisco router is forwarding traffic to the BTDSL router using this (S* ….) static route and
the BT router is forwarding traffic to this (172.16.15.169) default gateway.
Every router makes its own decision on where to forward traffic to hence following the hop
by hop paradigm.
Static Continued:
So, my home router is connected to the Internet and can afford traffic onto the Internet
even though it doesn't know all the routes in the Internet. Internet routing tables are
growing all the time. So, there are more than 500,000 routes on the Internet and a small
Router wouldn't be able to handle that number of routes in its routing table.
I'm told that I can log in with this username which gives me a read only access to the router
and I'm going to type show route summary. as you can see here there are 8.5 million odd
routes in the routing table with 567879 destinations.
Show BGP summary, will show me the BGP routing table. BGP is the routing protocol used
on the Internet.
So total Paths 8.5 million, active is 5607807.
As you can imagine a small router is not going to be able to handle this number of routes in
its routing table
Here you can see examples of routes in the BGP routing table on this router and how long
those routes have been in the routing table.
Small routers aren't going to handle that number of routes. So, you would typically use a
default route pointing your router to a gateway of last resort.
So, a default route is a special type of static route pointing your device or router to a
gateway of last resort. This is similar to the concept of a default gateway on a PC or a device
such as an iPhone or iPad.
When the router doesn't know where to send the traffic. It simply sends it to the gateway of
last resort.
In other words, it will send it to this IP address as configured with the static default route
Another advantage of static routes is that you as the administrator determine
explicitly where traffic flows. So rather than a routing protocol making the decision
for you. you decide and have control over where traffic goes or where packets are
routed.
But on the flip side the burden of Management and keeping things up to date also
fall on your shoulders. So, you have to administer the routing table. Keep it up to
date. Make sure that routes are not pointing to non-existent devices where networks
go down. You would have to update the routing table and that's simply not scalable
in large typologies.
Dynamic Routes:
So, hence dynamic routing protocols such as OSPF or EIGRP are used to dynamically
add or remove routes from routing table. BGP is mentioned is the routing protocol
used on the internet for very large-scale implementations.
The major advantage of dynamic routing protocols is that there is the dynamic or
automatic adjustment of the routing table based on topology changes in your
network. So rather than you having to manually adjust to a topology change the
routing protocols update insert or remove routes from the routing table based on
changing conditions in the network.
As soon as you enable a routing protocol such as OSPF or EIGRP, the routers will
form a neighbor or peer relationships with each other and exchange routes with one
another. The routers will thus automatically learn about the networks available in the
typology. router exchange information about routes using different methods. But as
an example, OSPF uses a link state updates to advertise information about routes
that are available in the network topology. This puts overhead on the network
because additional traffic is sent and received by routers as they communicate with
one another.
However, as the network grows there is an exponential increase in the amount of
work that would be required if static routes were used and thus because of the
advantage that dynamic routing protocols put less overhead and workload on
administrators to maintain routing tables.
They are used in most networks today especially large networks with the largest
being the Internet which runs on BGP or border gateway protocol.
And once again dynamic routing protocols can adjust to changes in the topology
automatically and without administrative intervention.
ip route (Destination Network address) (Next Hop router or Exit interface)