03-07-2017 06:22 AM - edited 03-05-2019 08:09 AM
Hi
I need a help. I have an ISR 2921 connected with two ISP on BGP. I anounce them one network 37.139.*.0/24.
How can I make a failover with this? I need that all traffic goes to ISP1 and if internet down all traffic goes to ISP2.
Thanks for help!
Solved! Go to Solution.
03-07-2017 07:08 AM
Hello
As this sounds like you have just the one router connecting to two ISP's?
You don't mention if ithey are same or different ISP's, In any case I am assuming the latter, So you should be able to utilize the Weight and As-path path attributes to accommodate your request.
For as-path prepending I would suggest liaise with your ISP's to make they allow prepending, as they could easily over-wright such action
Example:
access-list 10 permit 37.139.x.0 0.0.0.255
ip as-path access-list 10 permit ^$ <---------------(to stop your site becoming a transit for either ISP, it just advertises local prefixes and not each others ISP routes)
route-map ISP2_rm permit 10
match ip address 10
set as-path prepend Y Y Y
router bgp Y
network 37.139.x.0 mask 255.255.255.0
neighbor <ISP1> remote-as X
neighbor <ISP1> weight 50000 <------------------Outgoing traffic proffered over this path
neighbor <ISP1> filter-list 10 out <----------------- just advertise local routes
neighbor <ISP2> remote-as Z
neighbor <ISP2> weight 10000
neighbor <ISP2> route-map ISP2_rm out<----------------ISP2 see your advertise network less preferred and should go via ISP1 to get to it.
neighbor <ISP2> filter-list 10 out <----------------- just advertise local routes
res
Paul
03-07-2017 07:08 AM
Hello
As this sounds like you have just the one router connecting to two ISP's?
You don't mention if ithey are same or different ISP's, In any case I am assuming the latter, So you should be able to utilize the Weight and As-path path attributes to accommodate your request.
For as-path prepending I would suggest liaise with your ISP's to make they allow prepending, as they could easily over-wright such action
Example:
access-list 10 permit 37.139.x.0 0.0.0.255
ip as-path access-list 10 permit ^$ <---------------(to stop your site becoming a transit for either ISP, it just advertises local prefixes and not each others ISP routes)
route-map ISP2_rm permit 10
match ip address 10
set as-path prepend Y Y Y
router bgp Y
network 37.139.x.0 mask 255.255.255.0
neighbor <ISP1> remote-as X
neighbor <ISP1> weight 50000 <------------------Outgoing traffic proffered over this path
neighbor <ISP1> filter-list 10 out <----------------- just advertise local routes
neighbor <ISP2> remote-as Z
neighbor <ISP2> weight 10000
neighbor <ISP2> route-map ISP2_rm out<----------------ISP2 see your advertise network less preferred and should go via ISP1 to get to it.
neighbor <ISP2> filter-list 10 out <----------------- just advertise local routes
res
Paul
03-09-2017 12:11 AM
You don't mention if ithey are same or different ISP's, In any case I am assuming the latter
Yes, you are right.
Thanks for help! I thought the same but wanted to make sure.
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