cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2678
Views
30
Helpful
9
Replies

static and dynamic routing on same router

Sandip Barot
Level 1
Level 1

Hi There,

 

Is it possible to use static and BGP route on the same router.

 

If my router is connecting to 3 different networks and I already have static routes to 2 networks. Now, want to connect to  3rd network but it supports connectivity using BGP only. So, is it possible to configure in the same router without affecting any existing routes or I need another router to connect the new network ?

 

Thanks

 

S

9 Replies 9

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

Yes, the two can co-exist happily on the same router.

 

Remember that a static route has a lower Administrative Distance than BGP. Static routes for the exact same subnet& mask will be preferred over a BGP route and installed in the routing table.

 

Obviously one protocol can provide a route for a shorter prefix length whilst the other protocol could install a route within the same subnet but for a more specific mask, ie:

 

 

BGP > 192.168.0.0 /16
Static > 192.168.1.0 /24

 

Cheers

Seb.

Hello

yes I I is viable to have static and dynamic routing applied at the same time - the router should take preference towards static routes of the same length than from the routing process providing  no manual route manipulation is applied 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi

Yes, you can have BGP and static routers, it could impact the flow of the traffic if you are not considering: 

- The lowest administrative distance will be prefered, BGP (internal AD 20, external AD 20), static route AD 1 (but it can be adjustable, for example:  ip route 192.168.10.0 255.255.255.0 1.1.1.1  250

- The more specific subnet mask will be prefered. 192.168.10.0/27 will be prefered than 192.168.10.0/24

 

You must analize the behavior before make changes. 

 

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Joseph W. Doherty
Hall of Fame
Hall of Fame
"Is it possible to use static and BGP route on the same router."

As the other posters have noted, the answer is yes.

"So, is it possible to configure in the same router without affecting any existing routes or I need another router to connect the new network ?"

That's an "it depends" answer for both whether existing routes might be affected and whether you would need another router. The other posters have also addressed some of the considerations having static routes and BGP routes "competing" on the same router. However, any dynamic routing protocol is generally more resource intensive than static routing, BGP in particular especially if you're going to accept the full Internet route table. Also, might this additional third interface add traffic to your existing router? I.e. insufficient information about whether you would need another router (or perhaps a more powerful router) than the one you have now, due to issues beyond whether you can configure your static routes not to be impacted by the to be added BGP routes.

Sandip Barot
Level 1
Level 1

Thanks to all who replied with their comments, those are really helpful.

 

We are going to use this BGP route primarily to connect to our cloud network (e.g AWS/GCP) and these providers not support static routing to connect to them and that is why BGP.

So, only routes we get  from these providers over BGP are their networks. For all other connectivity to normal internet there will be static routes.  So, the routes learned will be to the cloud provider network and rest of the world IP addresses to be going out through our static route.

 

Does any other consideration ((ie route preference or anything else ) needed while implementing this ?

 

 

 

Sine the cloud providers will be stub networks, ie, providing no transit links to destiatios outside of the cloud subnets, you should be safe with default metrics and standard resdistribution into your local routing table.

 

cheers,

Seb.

Hi

No consideration, it should work fine since you will be receiving specific prefixes through BGP. The rest of the traffic will use the default routes. 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hello


@Sandip Barot wrote:

Does any other consideration ((ie route preference or anything else ) needed while implementing this ?


 

Yes -  Your bgp connections between your Service Providers -  you need to make sure  you do not become a transit path for either of them so to negate this only advertise your local originated routes to them nothing more.

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

BTW, what Paul is warning against, a good SP will also handle, i.e. they normally wouldn't accept transit prefixes from you. However, it's still good practice to guard against this as Paul suggests.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card