BGP with two isps

Unanswered Question


  I have one public block which is example) and this same ip block should advertise with two isps because these network ips are mailing server ips(smtp server,pop server etc).How to configure this in our cisco router?If one isp link goes down,then the second isp will get up and the same ip block should be accessed by second isp.


Two isps link terminated at same cisco router. server ips)

Plz tell me how to configure this using BGP.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Calin Chiorean Wed, 06/09/2010 - 02:05
User Badges:
  • Silver, 250 points or more

What you want there is called BGP multihoming. But be aware that is NOT a public IP subnet. You cannot advertise that to your providers.

If that is your subnet indeed, than you have to use NAT.

Next the BGP configuration is pretty simple. You have 2 peerings with the two ISP and then you advertise your public network (with network statement) to both providers. If you want only one line to be active at the time, you have more choices like:

-use backup interface, then the backup is taking place at the level interface

-use tracking

-use BGP attributes to influence the traffic to go over one link

About BGP multihoming please check:


francisco_1 Wed, 06/09/2010 - 03:34
User Badges:
  • Gold, 750 points or more

I think for what you are trying to do BGP conditional Advertisement is what you need.

For example assume that your AS is connected to two ISPs. One of the ISP say secondary you want to use in case of emergency with the primary ISP if the primary is down. BGP conditional Advertisement will enable you to track a certain prefix from primary ISP and announce your block 203.112.x.x to primary. If the primary ISP fails, (once the tracked prefix is gone), then you withdrawn your announcement from primary ISP and then announce your block 203.112.x.x to secondary ISP.


francisco_1 Wed, 06/09/2010 - 03:41
User Badges:
  • Gold, 750 points or more

You might be able to do the simalar with BGP aggreagation by aggregating your block and advertise specific (longest match) to ISP A and those will be more prefered than ISP B. (BGP CRI - Conditional Route Injection is similar)


Calin Chiorean Wed, 06/09/2010 - 03:35
User Badges:
  • Silver, 250 points or more

[email protected]

Thanks for your reply.

Im going to advertise this ip block 203.112.x.x with 2 isps.

When the bgp prepending is happening?

Sorry, I don't understand your question.

You can prepend your own AS number by using a route-map with statement like "set as-path prepend AS-NUMBER" and then use the route-map on the BGP neighboor peering direction out to influence the traffic inbound.

Mohamed Sobair Wed, 06/09/2010 - 04:07
User Badges:
  • Gold, 750 points or more


With BGP you cant achieve this, because your mail server has a single public IP that points to one of the service providers, and the second provider wont accept this IP address if the primary link fails.

However, you can ONLY achieve this if you have two outbound connections and NAT , or if you are using Multihoming BGP with NAT, so your SMTP server is pointed to two IPs if the primary fails, the secondary takes over. (with different IP address).

However, The most important point to make sure about is to have 2 MX records, one points to 1st provider and the second point to Second provider With HIGHER priority.

Those MX records should be configured on both of the provider's DNSs.




This Discussion