weight/metric and BGP default route from provider

Answered Question
Jan 22nd, 2008
User Badges:

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


Correct Answer by Danilo Dy about 9 years 4 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (3 ratings)
Loading.
Correct Answer
Danilo Dy Tue, 01/22/2008 - 06:17
User Badges:
  • Blue, 1500 points or more

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

Actions

This Discussion