Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

BGP advertising question

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
Hall of Fame Super Bronze

BGP advertising question

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

Hall of Fame Super Bronze

BGP advertising question

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.

3 REPLIES
Hall of Fame Super Bronze

BGP advertising question

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

Community Member

Re: BGP advertising question

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

Hall of Fame Super Bronze

BGP advertising question

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.

430
Views
0
Helpful
3
Replies
CreatePlease to create content