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

BGP dual Multi-home

kazimjhon
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame
5 Replies 5

balaji.bandi
Hall of Fame
Hall of Fame

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.

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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

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!


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

@paul driver 

 

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 ?

Hello


@Georg Pauwen wrote:

@paul driver 

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card