12-11-2015 09:22 AM - edited 03-05-2019 02:55 AM
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.
Solved! Go to Solution.
12-11-2015 11:16 AM
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
12-11-2015 10:53 AM
Hello,
Do have two different subnets on R1 and R2?
Masoud
12-11-2015 11:16 AM
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
12-11-2015 12:57 PM
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!
12-11-2015 01:36 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide