Configure BGP

Configure BGP

following the Thread on the above link, When I purchase Public IP addresse(s), and register the IP addresse(S) with a Public DNS, then how do I configure my router for BGP so that customers will chose ISP1 as most preferred to get to that public IP address and use ISP2 as less preferred

Thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jan SpringerCommented:
What router manufacturer?
jskfanAuthor Commented:
That 's Cisco Router
Jan SpringerCommented:
This should work:


ip prefix-list ANNOUNCE seq 5
ip prefix-list ANNOUNCE seq 5 le 24

route-map LOCALPREF permit 10
 set local-preference 500

route-map DEPREFER permit 10
 match ip address ANNOUNCE
 set as-path prepend 65535 65535 65535

router bgp 65535
 neighbor description Primary ISP
 neighbor route-map in LOCALPREF
 neighbor prefix-list ANNOUNCE out
 neighbor description Backup ISP
 neighbor route-map DEPREFER out
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

jskfanAuthor Commented:
Thanks Jan Springer,
for Education purposes, can you please comment below each line, just to explain what each line is meant for ?
Jan SpringerCommented:
The prefix list defines those subnets that you are announcing to your upstream.

The LOCALPREF route-map assigns a higher local preference for outgoing traffic to your preferred provider.

The DEPREFER route-map prepends your ASN to create a longer and less preferred path.
jskfanAuthor Commented:
in your example  is the Public IP that is registered on  the public DNS  ?
the same applies to this one le 24?
Jan SpringerCommented:
No, that's the subnet that's assigned to you either by one of your providers or your RIR.  

IPs out of that subnet could/would be defined in DNS.

"le 24" means allow me to announce this subnet as one /23 or two /24s.
jskfanAuthor Commented:
Ok Thanks Jan...

What is the key word
meaning in :
neighbor prefix-list ANNOUNCE out


neighbor route-map DEPREFER out

Why not "IN", since customer will try  to get in ?
Jan SpringerCommented:
I want to announce these prefixes  going OUT to my neighbor.

How I want to traffic engineer data coming IN to me.

The "why" has to do with logic and how the people that wrote the RFCs determined.
jskfanAuthor Commented:
I thought since these subnets are already out on the Public DNS le 24

customers will use them to get in
jskfanAuthor Commented:
Jan Springer,

probably if you can comment each line..That might help me understand better the "Morse Code"
Jan SpringerCommented:
The purpose of using BGP is to tell your router how you want to reach the outside world and how you want the outside world to reach you.

Again.  You are confusing BGP and DNS.
jskfanAuthor Commented:
In your example what do these IP addresses represent   ?
jskfanAuthor Commented:
Ok , just to confirm the way they have explained it to me:
My company will have Public IP addresses for my web servers x.x.x.x , y.y.y.y , these addresses Registered in DNS.
I will advertise those IP Subnets  to ISP-A and ISP-B , then on my edge router I can configure, for instance if  a Customer needs access x.x.x.x network then they can come through ISP-A if they need to access y.y.y.y network then they can come through ISP-B

Jan SpringerCommented:

If you can advertise address space via BGP, then you have a /24 or larger.  Those are the IPs that you put on your server and configure in DNS.

The path taken by your customers to reach you will be determined by your traffic engineering (localpref, etc) and their provider traffic engineering.

And it looks like this:

   SomeRemoteIPs => Internet => ProviderA \
                                                                                  => MyCompanyRouter  => Servers
   OtherRemoteIPs => Internet => ProviderB /
jskfanAuthor Commented:
MyCompany is my Router where BGP is configured.. it will advertize to ISP-A and ISP-B the purchased IP subnets.

Public DNS will have Ip addresses of my web servers..

The path that will be  taken by my customers to reach my web servers will be determined by the configuration of BGP on Mycompany router (as you stated for instance using Local Preference attribute)
jskfanAuthor Commented:
the IP addresses I put on public DNS , will be within the subnets I advertize through BGP
jskfanAuthor Commented:
Correct ?
Jan SpringerCommented:
What's confusing is that it appears that you are configuring two IPs for the server in DNS.  This is fine if there are two servers but not if they're the same server behind a NAT device.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
I see what you are saying ...
Was just example in case you purchased 2 or more IP ranges for  2 or more different sites
Jan SpringerCommented:
No.  It does not matter how many /24s or larger that you have.  You give your server one IPv4 and one IPv6 (in this example) address and one IP only.

That address comes out of a larger block (regardless as to how it's subnetted within your network) and which is advertised to your providers via BGP.

I would strongly advise you to hire a consultant to put your network together.

Your tenacity to stick with this and learn is impressive.  However, a network that is put together well requires expertise.

Your need for answers goes beyond a "question and answer" forum.
jskfanAuthor Commented:
Thank you  Jan Springer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.