cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
934
Views
0
Helpful
6
Replies
mulhollandm
Beginner

BGP default route distribution

folks

if i have two isp connections passing a default route to my routers and i want to set up a failover environment

how do i pass both default routes to my routers but mark one as the preferred route and the other as a less preferred route, i.e. metric 0 and metric 10

do i use 'set metric' and a route map?

i'd be grateful to anyone with a related config

thanks to anyone taking the time to respond and apolgies if i'm a bit vague or lacking sufficient detail

1 ACCEPTED SOLUTION

Accepted Solutions
boss.silva
Beginner

Hello,

If they are eBGP, and you are the customer, you can use the local-preference to set a preferred route.

Would be something like that:

access-list 10 permit 0.0.0.0 OR ip prefix-list default permit 0.0.0.0/0

route-map default-route permit 10

match ip address 10 OR match ip prefix-list default

set local-preference 200

router bgp

neighbor <preferred neighbor> route-map default-route in

If you are the provider, as you said, you can use the metric. the only thing that would change is on the route-map, would be "set metric X", where this metric would be a valuer higher than the preferred route's metric.

Then do a soft reset and this should be good.

Regards,

Bruno Silva.

View solution in original post

6 REPLIES 6
boss.silva
Beginner

Hello,

If they are eBGP, and you are the customer, you can use the local-preference to set a preferred route.

Would be something like that:

access-list 10 permit 0.0.0.0 OR ip prefix-list default permit 0.0.0.0/0

route-map default-route permit 10

match ip address 10 OR match ip prefix-list default

set local-preference 200

router bgp

neighbor <preferred neighbor> route-map default-route in

If you are the provider, as you said, you can use the metric. the only thing that would change is on the route-map, would be "set metric X", where this metric would be a valuer higher than the preferred route's metric.

Then do a soft reset and this should be good.

Regards,

Bruno Silva.

bruno

many thanks for your reply

i'll run this on gns and test it out

Jon Marshall
VIP Community Legend

Do you mean pass the default-routes from your BGP routers to your internal routers ? If so what routing protocol are you running between your BGP routers and the interior routers.

Or do you mean make one BGP router the preferred path once the traffic has arrived at the BGP routers ?

Jon

jon

thanks for helping out

my problem is how should i pass the default route from my routers peering with the ISP to the routers below as the less favourable route so i can force traffic out my primary link

if the primary link fails then the less preferred route should move from the bgp table into the routing table

sorry if i'm confusing things

thanks

ameya_oke
Beginner

Hi Mul,

I assume you have setup as above and there is IBGP between R1 and R2 along with HSRP for high availability, you dont have to redistribute those defaults in your IGP.

Consider R1 is HSRP Active.

Now R1's BGP table will have 2 prefixes for the default route.

1. EBGP prefix

2. IBGP Prefix

Now, if BGP on R1 fails, packets would automatically take path via R2.

Hope it was useful.

Ameya

ameya

many thanks for your reply

i resolved the issue using the bgp default local-preference 150 command

i only needed to influence my own AS group so the local-preference command seemed the best option

thanks to everyone who replied and my apologies if i confused or didn't clarify the issues