cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1269
Views
9
Helpful
3
Replies

weight/metric and BGP default route from provider

tato386
Level 6
Level 6

I am getting two default routes from my two ISPs via BGP. Since the routes are now equal in weight/metric my outbound traffic is being balanced out both provider circuits. How can I add a weight or metric to one of the two so it becomes the preferred outbound connection?

Thanks,

Diego

1 Accepted Solution

Accepted Solutions

Danilo Dy
VIP Alumni
VIP Alumni

Hi,

Both ISP is connected to one router and you only received default route from both not full internet routing table?

Try this...

!

route-map DEFAULT-PREFERRED permit 5

match ip address prefix-list DEFAULT

set weight 150

!

ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0

!

! ...and put the route-map to your preferred ISP for outgoing traffic

!

neighbor a.b.c.d route-map DEFAULT-PREFERRED in

!

To make it work...

Router# clear ip bgp a.b.c.d soft in

Alternatively, you can block all incoming BGP advertisement from your upstream and just put a default route to both with higher AD to non-preferred ISP.

ip route 0.0.0.0 0.0.0.0 a.b.c.d 10 name preferred-isp

ip route 0.0.0.0 0.0.0.0 w.x.y.z. 20 name non-preferred-isp

Regards,

Dandy

View solution in original post

3 Replies 3

texanmutt
Level 1
Level 1

You can use local preferance for that.

Danilo Dy
VIP Alumni
VIP Alumni

Hi,

Both ISP is connected to one router and you only received default route from both not full internet routing table?

Try this...

!

route-map DEFAULT-PREFERRED permit 5

match ip address prefix-list DEFAULT

set weight 150

!

ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0

!

! ...and put the route-map to your preferred ISP for outgoing traffic

!

neighbor a.b.c.d route-map DEFAULT-PREFERRED in

!

To make it work...

Router# clear ip bgp a.b.c.d soft in

Alternatively, you can block all incoming BGP advertisement from your upstream and just put a default route to both with higher AD to non-preferred ISP.

ip route 0.0.0.0 0.0.0.0 a.b.c.d 10 name preferred-isp

ip route 0.0.0.0 0.0.0.0 w.x.y.z. 20 name non-preferred-isp

Regards,

Dandy

Thank you sir. Your route-map option did the trick!

Diego

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco