cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1303
Views
0
Helpful
3
Replies

BGP advertising question

Ruterford
Level 1
Level 1

Hello,

I have two locations with two BGP routers facing the same ISP BGP router via different links.

I have advertised network x.x.x.x/24 from location 1 and network y.y.y.y/24 from location 2 via the same BGP AS.

I have a local link between the locations connecting BGP routers with EIGRP redistributing default route

Now  I need to advertise both networks from both locations, but I need higher priority for the "home" network over the "foreign" network, so traffic from ISP would prefer first location for it's "home" network in case if both paths are available.

Location 1 (home network x.x.x.x/24)

BGP AS 10

Advertised network x.x.x.x/24

Need to advertise "foreign" network y.y.y.y/24 with lower priority to kick in only if there is no path to Location 2

Location 2 (home network y.y.y.y/24)

BGP AS 10

Advertised network y.y.y.y/24

Need to advertise "foreign" network x.x.x.x/24 with lower priority to kick in only if there is no path to Location 1

Since I am new to BGP I guess this could be achieved somehow with BGP prepend, I would appreciate if you can give me a sample based on my topology.

Thanks!

2 Accepted Solutions

Accepted Solutions

Edison Ortiz
Hall of Fame
Hall of Fame

You are in the right path,

AS-PATH prepend will provide the solution you are after.

On Location 1, you will advertise both x.x.x.x/24 and y.y.y.y/24 while prepending y.y.y.y/24

On Location 2, you will do the opposite.

Location 1:

access-list 1 permit y.y.y.y/24

route-map prepend

match ip address 1

set as-path prepend 10 10 10

router bgp 10

neighbor x.x.x.x route-map prepend out

Location 2:

access-list 1 permit x.x.x.x/24

route-map prepend

match ip address 1

set as-path prepend 10 10 10

router bgp 10

neighbor x.x.x.x route-map prepend out

View solution in original post

Yes, you need a network statements in both locations and those networks must be in the routing table in order to be advertised by BGP.

View solution in original post

3 Replies 3

Edison Ortiz
Hall of Fame
Hall of Fame

You are in the right path,

AS-PATH prepend will provide the solution you are after.

On Location 1, you will advertise both x.x.x.x/24 and y.y.y.y/24 while prepending y.y.y.y/24

On Location 2, you will do the opposite.

Location 1:

access-list 1 permit y.y.y.y/24

route-map prepend

match ip address 1

set as-path prepend 10 10 10

router bgp 10

neighbor x.x.x.x route-map prepend out

Location 2:

access-list 1 permit x.x.x.x/24

route-map prepend

match ip address 1

set as-path prepend 10 10 10

router bgp 10

neighbor x.x.x.x route-map prepend out

Thank you Edison for quick reply.

Should I keep "network" statements under the "router BGP 10" definitions?

Namely, if we take Location 1 (x.x.x.x/24 - "home" and y.y.y.y/24- "foreign" and z.z.z.z - ISP router )

Location 1:

access-list 1 permit y.y.y.y/24

route-map prepend

match ip address 1

set as-path prepend 10 10 10

router bgp 10

network y.y.y.y mask 255.255.255.0

network x.x.x.x mask 255.255.255.0

neighbor z.z.z.z route-map prepend out

Yes, you need a network statements in both locations and those networks must be in the routing table in order to be advertised by BGP.