cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
362
Views
5
Helpful
4
Replies

Complex BGP routing situation

I have a site where I'm putting a pair of routers, with the switches behind them connected together, and it is doing my head in. One of the routers has a T1, and both have LTE modems for backup. I want all routes advertised out the T1 as primary, but if it fails each router should advertise its own routes out the LTE, and be backup to the other router's routes. So what I need to advertise is something like this:

R1

T1-neighbor

All routes normal

LTE-neighbor

R1's routes prepended once

R2's routes prepended twice

R2

LTE-neighbor

R2's routes prepended once

R1's routes prepended twice

So how would I write config to handle this? And how about what networks BGP on each router should watch to determine when to advertise? Is this even possible?

Just leaving R2's routes going LTE all the time is not desirable since latency is an issue with the devices at the site. Eventually R2 will get a T1 and the link between the networks will be removed, but that will probably be months away.

1 Accepted Solution

Accepted Solutions

Adding to my previous comment. This is only an example based on what I see in your post.

R1

ip prefix-list R1-ip seq 5 permit 217.217.1.0/24 
ip prefix-list R2-ip seq 5 permit 218.218.1.0/24

route-map my-ip-to-LTE permit 10
 match ip address prefix-list R1-ip
 set as-path prepend 500

route-map my-ip-to-LTE permit 20
 match ip address prefix-list R2-ip
 set as-path prepend 500 500


 neighbor 200.200.200.1 route-map my-ip-to-LTE out 

route-map my-ip-to-T1 permit 10
 match ip address prefix-list R1-ip
  match ip address prefix-list R2-ip

 neighbor 100.100.100.1 route-map my-ip-to-T1 out 

on R2

ip prefix-list R1-ip seq 5 permit 217.217.1.0/24 
ip prefix-list R2-ip seq 5 permit 218.218.1.0/24

route-map my-ip-to-LTE permit 10
 match ip address prefix-list R2-ip
 set as-path prepend 500

route-map my-ip-to-LTE permit 20
 match ip address prefix-list R1-ip
 set as-path prepend 500 500

neighbor X.X.X.1 route-map my-ip-to-LTE out 

Hope it helps,

Masoud

View solution in original post

4 Replies 4

Hello,

Do have two different subnets on R1 and R2?

Masoud

Adding to my previous comment. This is only an example based on what I see in your post.

R1

ip prefix-list R1-ip seq 5 permit 217.217.1.0/24 
ip prefix-list R2-ip seq 5 permit 218.218.1.0/24

route-map my-ip-to-LTE permit 10
 match ip address prefix-list R1-ip
 set as-path prepend 500

route-map my-ip-to-LTE permit 20
 match ip address prefix-list R2-ip
 set as-path prepend 500 500


 neighbor 200.200.200.1 route-map my-ip-to-LTE out 

route-map my-ip-to-T1 permit 10
 match ip address prefix-list R1-ip
  match ip address prefix-list R2-ip

 neighbor 100.100.100.1 route-map my-ip-to-T1 out 

on R2

ip prefix-list R1-ip seq 5 permit 217.217.1.0/24 
ip prefix-list R2-ip seq 5 permit 218.218.1.0/24

route-map my-ip-to-LTE permit 10
 match ip address prefix-list R2-ip
 set as-path prepend 500

route-map my-ip-to-LTE permit 20
 match ip address prefix-list R1-ip
 set as-path prepend 500 500

neighbor X.X.X.1 route-map my-ip-to-LTE out 

Hope it helps,

Masoud

In answer to your question first; each router "owns" several subnets, but all their own. The only reason both routers need to manage all the subnets is the link between the two stacks.

I think your answer will help a great deal. What I was missing is the ability to have different prepend statements on different lines in a route map. I believed it was only one prepend per map. I've only been touching BGP and other heavy routing for about a month and have a lot to learn. I'm learning fast, though, especially with helpful folks like you to turn to.

Thank you!

I am glad my answer was helpful.

route-map my-ip-to-LTE permit 10
 match ip address prefix-list R2-ip
 set as-path prepend 500

route-map my-ip-to-LTE permit 20
 match ip address prefix-list R1-ip
 set as-path prepend 500 500

route-map my-ip-to-LTE permit 30
 match ip address   XXXX
 set as-path prepend XX   XX   XX   XX XX

The name of all route-maps for a specific neighbor is the same. Just numbers are different so you can add more criteria.

Hope it helps,

Masoud

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:

Review Cisco Networking products for a $25 gift card