Blog

IP and Mobile Trends and Education

 

Where to use static and where to use dynamic routing?

Author:


25.08.2017

Routing is the crucial process in IP networks responsible for IP prefix propagation and keeping the whole network topology in order. Having billions of IP addresses divided into many different subnets, without routing there would be muddle that will prevent the whole Internet from working. So, routing is like the set of rules that allows localize particular IP network and IP addresses that belongs to that network. This set of rules needs to be consistent across the whole IP cloud. Look at the below picture and imagine that computers want to communicate to each other. If the laptops have IP addresses from different subnets they have no clue how to get the different address. They will use their default gateways but whats next?

static routing vs dynamic routing - what is routing

 

Here comes the routing

The missing mechanism that informs the network how to get to the different IP Networks (known as IP prefixes) is routing. Routing is satisfied by network devices known as routers. Routers route the IP packets traversing the network to right direction based on routing information. So, routing information is about where to send the packet to get to destination. On below scheme, all routers which form a network need to have consistent routing information so that every laptop is then able to communicate with each other.

static routing vs dynamic routing - what is routing

 

Static routing

How routers know the IP destinations? One way to achieve full information is to tell the router manually about specific destination. This process of telling about specific destination by the human is called static routing information. Setting the single static route is very quick administrative task. But take a note that when deciding to go with static routing solution, network admin is responsible for informing every router about:

  • every change in topology,
  • every new prefix,
  • every prefix removal

So in our picture if there is only one change of IP subnet address from 172.16.1.0/24 to 172.17.17.0/24, administrator needs to make six operations: remove old prefix, put the new one, and make it three times.

 

static routing problem

 

Dynamic routing

Now, imagine that your network consists of 100 routers and you have to add only 2 new different subnets to the network because there is an opening of new office in your company. You would need to add 200 static routing entries. Imagine another example that there is Internet routing change with thousands of routers managed by different Internet Service Providers and routing tables have over 600 000 prefixes. What is wrong with static routing here?

  • the agreements between administration domains will take ages,
  • the static modifications will be nightmare,
  • the probability of mistake will rise incredible,
  • the change process will be very long
  • the static routing may not react to network failures thus the fail could break whole communication

There is one more point related to the static routes problem, that is possibility of routing loops creation by mistake. Yes, that is why we need to use dynamic routing.

Dynamic routing solves the above problems. With dynamic routing there is an automatic process running between all routers. The process is called routing protocol and is designed to

  • exchange IP prefixes between routers,
  • find the optimal (shortest) path to destination,
  • form anti-loop topology
  • automate changes
  • speed up the process of administrative tasks
  • react to topology changes and failures and recalculate optimal path

 

dynamic routing scheme

Example of dynamic routing protocols are BGP, EIGRP, OSPF and RIP  that you can choose according to your topology, specific requirements ( like scenario: WAN, Internet Edge, Data Center, SP networks), technical capabilities (vendor, type of devices, supported protocols) and so on.

 

So, where to use static and where to use dynamic routing?

Above consideration points out the pros and cons of the dynamic and static routing approach. Anyway, what you should choose, should be answered based on your scenario. Let’s read the examples:

  • Example 1: If you have one router connected to Internet at home, use static route 0.0.0.0/0 pointing to your ISP. You do not need the dynamic routing.
  • Example 2: If you have single link between two locations and you have only 2 networks in location A and 4 networks in location B, use can still use static routing (no big administrative overhead).
  • Example 3: If you have WAN network of 10 sites and HQ, and each site has than 10 IP networks and some of them has connections to other sites, use dynamic routing (complexity).
  • Example 4: If you have ISP 1 and ISP 2 and you are responsible for achieving Internet Edge and E-commerce redundancy, use dynamic routing (automation needed).

 

If you want to get a hint how to configure static routing check this config. If you want to configure dynamic routing visit Grandmetric Knowledge Base: Routing corner

Stay Connected!

Author

Marcin Bialy

Marcin Biały is Network and Security Architect with over 12 years of experience, with Service Provider and Enterprise networking background. He used to work for large service providers, global vendors and integration services companies as Network Architect, Leading Architect and Techincal Solution Manager positions. He designed, implemented and supported dozens large scale projects and infrastructure migrations, solved hundreds of tickets and spent hours with CLI and GUI of many flavors. Marcin is also holding industry recognizable certificates such as CCNP, CCNA, CCSI #35269, FCNSP #7207, FCNSA and more.

3 Comments
Babban
25 March 2018 at 12:56

I have a situation something like example 4 above. But, for me ISP1 BW is more than ISP2 BW which is more than ISP3 BW. Each ISP IP pool is totally different, no super-netting works. Each ISP is terminated on their own Cisco 2600 router and all the routers are then connected to a Cisco 4500 switch. I have a requirement that some service, running on a single physical machine having two NIC, should primarily be served through ISP1, as it is having highest BW. But, in the event of failure of ISP1, it should automatically be served through ISP2 and than through ISP3 if ISP2 also fails.
How to achieve this arrangement? What extra hardware, software and configuration needed?

 
Marcin Bialy
26 March 2018 at 20:42

Hi Babban. Thanks for question. As far as i understand, you have PA addressing asssigned by your 3 ISP’s. I see few potential solutions for your problem. First one is acquiring the PI pool from your Internet Registrar and become independent of your ISPs in terms of public IP addressing, with this solution the best way would be to have BGP dynamic routing within Internet Edge and advertise your PI addressing pool to 3 ISPs. In case of ISP1 failure or ISP1 link failure, BGP will still advertise your pool via ISP2 and ISP3. However in such case the BGP ougoing policy should be constructed in a way that ISP1 is better than ISP2 than ISP3 (however, that could be not easy way to influence ISPs to behave as you requested but possible). The second option would be hiding your service behing some firewall / loadbalancer that will show your service to outside the world as one virtual IP and make some health-check on servers. Again here you will probably need some mechanism for DNS records updating in case of failure. You can also think about shifting your service to public cloud provider which has great resiliency. Everything depend on bugdet, SLA requirement. If you would like to know more please ping me via email at marcin.bialy@grandmetric.com

Best
Marcin

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code


 

Newsletter