02-12-2021 02:19 AM
I have two links from different ISP's with two different /24 prefix in one router. Now want to send 3.3.3.0/24 on one ISP 2.2.2.0/24 to the second ISP permanently and also want shift both prefixes automatically on one ISP if the second down. What will be the configuration for this scenario?
Solved! Go to Solution.
02-12-2021 02:32 AM - edited 02-12-2021 02:34 AM
yes it durable. example look below:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/23675-27.html
Attached good presentation to get overall how it works.
02-12-2021 02:32 AM - edited 02-12-2021 02:34 AM
yes it durable. example look below:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/23675-27.html
Attached good presentation to get overall how it works.
02-12-2021 04:54 AM
Hello,
are the 2.2.2.0/24 and 3.3.3.0/24 networks locally originated ? In that case, policy based routing is probably your best option. The config would look something like below (IP addressing is, obviously, arbitrary):
interface GigabitEthernet0/0
description Uplink to ISP 1
ip address 100.100.100.1 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
description Uplink to ISP 2
ip address 200.200.200.1 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
ip address 2.2.2.1 255.255.255.0
ip policy route-map TO_ISP_2
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
description Uplink to ISP_1
ip address 3.3.3.1 255.255.255.0
ip policy route-map TO_ISP_1
duplex auto
speed auto
media-type rj45
!
router bgp 1
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
network 3.3.3.0 mask 255.255.255.0
neighbor 100.100.100.2 remote-as 2
neighbor 200.200.200.2 remote-as 3
!
ip prefix-list 2-2-2-0 seq 10 permit 2.2.2.0/24
!
ip prefix-list 3-3-3-0 seq 10 permit 3.3.3.0/24
!
route-map TO_ISP_1 permit 10
match ip address prefix-list 3-3-3-0
set ip next-hop 100.100.100.2
!
route-map TO_ISP_1 permit 20
!
route-map TO_ISP_2 permit 10
match ip address prefix-list 2-2-2-0
set ip next-hop 200.200.200.2
!
route-map TO_ISP_2 permit 20
02-12-2021 09:34 AM - edited 02-12-2021 11:46 AM
Hello
You wouldn’t require policy based routing just using bgp attributes should work
you don’t mention if you have a single bgp rtr peering to two isps or dual bgp rtr peering wth dual isps
In any case you would advertise with as-path pre-pend on each prefix to the less preferred isp with a higher asn value but you are still then dependant on the mercy of each isp how they advertise your network.
example:
ip prefix-list 10 permit 3.3.3.3/32
ip prefix-list 11 permit 2.2.2.2/32
route-map prepend1 permit 10
match ip address prefix10
set as-path prepend local asn local asn local asn
route-map prepend1 permit 99
route-map prepend2permit10
match ip address prefix11
set as-path prepend local asn local asn local asn
route-map prepend2 permit 99
router bgp x
neighbour (isp1) route-map prepend1 out
neighbour (isp2) route-map prepend2 out
The above should change the advertisement for those prefixes towards both isps assuming that they are both already receiving both routes!
apologies for the text i am currently stuck in my car in the wilderness!
02-12-2021 10:18 AM
I (think I) did some extensive testing including what you proposed, but I did not get this to work with locally originated prefixes (as in the sample config I posted). The routing tables on your ISP routers show only one prefix (the one advertised through the route map) ?
Can you post your full running config ?
02-12-2021 11:33 AM - edited 02-12-2021 11:35 AM
Hello
@Georg Pauwen wrote:
I (think I) did some extensive testing including what you proposed, but I did not get this to work with locally originated prefixes (as in the sample config I posted).
In your lab it sounds like you dont have ebgp peering between ISP's to simulate wan or internet
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