09-24-2018 11:43 PM - edited 09-24-2018 11:44 PM
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
09-25-2018 12:24 AM
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.
09-25-2018 12:25 AM - edited 09-25-2018 12:28 AM
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
09-25-2018 04:36 AM - edited 09-25-2018 04:37 AM
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
:-)
09-25-2018 05:38 AM
09-26-2018 09:44 PM
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 ?
09-26-2018 11:50 PM
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.
09-27-2018 04:48 AM
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.
09-27-2018 05:05 AM
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.
10-08-2018 06:04 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide