BGP Help


#1

Hi,

I need some help with BGP.

Network diagram:

We want router 1 to be the primary router that all incoming traffic goes over and router 2 to be the backup.

How do I manipulate the prefixes I advertise to the ISP & INX’s so that router 2 is seen as futher away than router 1 so that router 1 takes all traffic unless it fails.


#2

I think what you want is AS path prepending. You can add (prepend) your own ASN to your advertisement one or more times to make it appear to particular upstream connections that you are “further away.” In reality this is more of a suggestion, and you will get some traffic that comes over the “backup” connection, especially traffic originating from the directly adjacent AS. You can use outbound route maps to prepend your AS. Also, consider using BGP communities from your ISPs to prepend their ASN a few times to the path. Only certain ISPs provide communities and/or communities with this function.


#3

Why would some traffic still come over the “backup” connection if the AS is seen further away?

I assume the ISP’s can also set a localPref value on their side for our router 2?


#4

you can use prefix control

for example :
your network prefix 100.100.144.0/21

router1 bgp advertised-routes to ISP-N 100.100.144.0/22 & 100.100.148.0/22 & 100.100.144.0/21
router2 bgp advertised-routes to ISP-N 100.100.144.0/21

router1 & router2 use bgp med control …


#5

I thought about that, would the ISP advertise the aggregated /21 to their peers and not the /22’s ?


#6

Pre-pending is not absolute, it’s ultimately a “suggestion” that any given BGP router is free to take into account, or ignore.


#7

Longest prefix match, you can try it first … !!


#8

have any update ?


#9

Yeah, using smaller prefixes on the primary router seems to be working well :slight_smile: