Avatar of jskfan
jskfanFlag for Cyprus

asked on 

Configure BGP

Configure BGP

https://www.experts-exchange.com/questions/29010316/Public-DNS-Vs-BGP.html

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
RoutersTCP/IP* bgp

Avatar of undefined
Last Comment
jskfan
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

What router manufacturer?
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

That 's Cisco Router
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

This should work:

#############################################

ip prefix-list ANNOUNCE seq 5 192.168.0.0/24
ip prefix-list ANNOUNCE seq 5 192.168.2.0/23 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 10.0.0.1 description Primary ISP
 neighbor 10.0.0.1 route-map in LOCALPREF
 neighbor 10.0.0.1 prefix-list ANNOUNCE out
 neighbor 172.16.2.1 description Backup ISP
 neighbor 172.16.2.1 route-map DEPREFER out
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

Thanks Jan Springer,
for Education purposes, can you please comment below each line, just to explain what each line is meant for ?
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

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.
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

in your example
192.168.0.0/24  is the Public IP that is registered on  the public DNS  ?
the same applies to this one 192.168.2.0/23 le 24?
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

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.
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

Ok Thanks Jan...

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

and

neighbor 172.16.2.1 route-map DEPREFER out

Why not "IN", since customer will try  to get in ?
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

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.
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

I thought since these subnets are already out on the Public DNS
192.168.0.0/24
192.168.2.0/23 le 24

customers will use them to get in
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

Jan Springer,

probably if you can comment each line..That might help me understand better the "Morse Code"
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

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.
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

In your example what do these IP addresses represent   ?
192.168.0.0/24
  192.168.2.0/23
 10.0.0.1  
  10.0.0.1
   10.0.0.1  
  172.16.2.1  
 172.16.2.1
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

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



User generated image
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

No.

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 /
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

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)
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

the IP addresses I put on public DNS , will be within the subnets I advertize through BGP
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

Correct ?
ASKER CERTIFIED SOLUTION
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

I see what you are saying ...
Was just example in case you purchased 2 or more IP ranges for  2 or more different sites
SOLUTION
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

Thank you  Jan Springer
Routers
Routers

A router is a networking device that forwards data packets between computer networks. Routers perform the "traffic directing" functions on the Internet. The most familiar type of routers are home and small office cable or DSL routers that simply pass data, such as web pages, email, IM, and videos between computers and the Internet. More sophisticated routers, such as enterprise routers, connect large business or ISP networks up to the powerful core routers that forward data at high speed along the optical fiber lines of the Internet backbone. Though routers are typically dedicated hardware devices, use of software-based routers has grown increasingly common.

49K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo