• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2483
  • Last Modified:

BGP - How to configure a Primary & Backup links

Dear Experts,

We're moving over to a new ISP for all our sites (MPLS) and we've had a new ADSL (standard UK broadband) circuit installed which will act as a backup line at the site I'm currently based at and the main circuit will be presented as two serial (2 x E1) connections (they will be bonded together using MLPPP).

I've tested the backup circuit on it's own and was able to see the ip routing table was being populated by my bgp beighbor. Now I want to configure my primary circuit (2xE1) and have this used as my main route in/out, and if it fails switch over to use the ADSL backup.

Here's my config so far, we're using MLPPP (multilink) to bond the two serial connections together:

interface Loopback99
 ip address 192.168.60.1 255.255.255.255
!

interface Multilink1
 ip address [INTERFACE_IP_ADDRESS]
 no ip proxy-arp
 no ip mroute-cache
 ppp multilink
 ppp multilink group 1
!

interface ATM0/0/0
 no ip address
 no atm ilmi-keepalive
 dsl enable-training-log
!

interface ATM0/0/0.1 point-to-point
 bandwidth 8192
 pvc 0/38
  vbr-nrt 288 288
  encapsulation aal5mux ppp dialer
  dialer pool-member 1
 !
!

interface Serial0/1/0
 no ip address
 encapsulation ppp
 clock rate 2000000
 ppp multilink
 ppp multilink group 1
!

interface Serial0/1/1
 no ip address
 encapsulation ppp
 clock rate 2000000
 ppp multilink
 ppp multilink group 1
!

interface Dialer1
 mtu 1492
 ip address negotiated
 encapsulation ppp
 dialer pool 1
 ppp authentication chap callin
 ppp chap hostname USERNAME@ISP
 ppp chap password PASSWORD
!

router bgp AS_NUMBER
 no synchronization
 bgp log-neighbor-changes
 network XXX.XXX.XXX.XXX
 redistribute connected
 redistribute static
 neighbor ISP_BGP_NEIGHBOR remote-as NEIGHBOR_AS_NO
 neighbor ISP_BGP_NEIGHBOR ebgp-multihop 255
 neighbor ISP_BGP_NEIGHBOR update-source Loopback99
 neighbor ISP_BGP_NEIGHBOR version 4
 neighbor ISP_BGP_NEIGHBOR send-community
 neighbor ISP_BGP_NEIGHBOR soft-reconfiguration inbound
 no auto-summary
!

When I was just testing the ADSL backup I just put a defaul route in:

ip route [BGP_NEIGHBOR_IP + MASK] Dialer1

How should I configure things now so my multilink interface (2xE1) are used all the time and if theres a problem it switch's over to my ADSL connection?

Should I setup a route-map?

Many thanks in advance

 

0
VanishingPoint
Asked:
VanishingPoint
  • 4
  • 4
  • 2
1 Solution
 
logic2Commented:
not sure if you are familiar with it or not but simply you need to do the following

1- configure both ISPs as BGP neighbors
2- add a weight 100 to the main ISP so that outgoing traffic is forced via the main
3- perform AS path prepending for the backup ISP, so that incoming traffic prefers the main link

if you are unable to perform this config tell me and i can send you a sample
0
 
QuoriCommented:
Are both ISP's sending a default route to you via BGP? If so, you'd be better off using a route-map and setting local-pref. So for your primary ISP you'd add a route-map to the BGP neighbor statement which sets local-pref to 380 and to the secondary ISP you'd specify a route-map on the BGP neighbor statement that sets the local-pref to 350.
0
 
logic2Commented:
apologies Quori but there is no need for a route map and local pref if this is the only access router
only weight would be needed
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
QuoriCommented:
Weight would work, I did not refute this. However the weight attribute is nowhere near as scalable given it is local to the device should they device for a measure of physical redundancy via HSRP/etc.

And weight is evaluated in the BGP decision process prior to AS_PATH.
0
 
VanishingPointAuthor Commented:
Hi - thanks for your comments guys. I should have said that I am multihomed to the same ISP (thus I only have one BGP neightbor) - does this make a difference?

Sorry, I'm pretty new to BGP
0
 
VanishingPointAuthor Commented:
^^ Actually I'm wrong with the above statement, I will have two neighbor statements but for the same ISP (AS number) - so for example my BGP config should look like this:

router bgp AS_NUMBER
  neighbor ISP_BGP_NEIGHBOR1 remote-as ISP_AS_NO (Neighbor on multilink/serials)
  neighbor ISP_BGP_NEIGHBOR2 remote-as ISP_AS_NO (Neighbor on ADSL)
0
 
logic2Commented:
would u do as i said please :D

neighbor 1 weight 100
neighbor 2 route-map ASPrepend

ip prefix-list matchall permit 0.0.0.0/0 le 32

R0(config)#route-map ASPrepend
R0(config-route-map)#match ip address prefix-list matchall
R0(config-route-map)#set AS-path prepend 1 1 1 1 1 1 1 <<<< your own AS number

now whenever the provider wishes to send you traffic the main link will be chosen because of shorter AS path, and whenever you want to send traffic the main link will be chosen because of higher weight
0
 
VanishingPointAuthor Commented:
Logic2 - big thanks for pointing me in the right direction here, I can see how/why this works but I have a few questions.....

Question 1.

If my BGP numder is say 5000, should the routemap config look like this:
                                   
        R0(config-route-map)#set AS-path prepend 5000 5000 5000 5000 - ?

How many times should I 'prepend' my AS to the advertised path to this neighbor?

Question 2.

I have also come across this method of configuring a main link and a backup link, it specifies that by setting the metric to 100 toward the main link neighbor, it manipulates the inbound traffic to prefer this link:

192.168.40.1 - Main Link
172.16.10.1 - Backup link

router bgp AS_NUMBER
  neighbor 192.168.40.1 remote-as NEIGHBOR_AS_NO
  neighbor 172.16.10.1 remote-as NEIGHBOR_AS_NO
  neighbor 192.168.40.1 route-map SETMETRIC1 out
  neighbor 172.16.10.1 route-map SETMETRIC2 out
  no auto summary
!

ip route 0.0.0.0 0.0.0.0 192.168.40.1 40 -> Prefer this link for sending
ip route 0.0.0.0 0.0.0.0 172.16.10.1 50

route-map SERMETRIC1 permit 10
  set metric 100

route-map SETMETRIC2 permit 10
  set metric 50

Which way is best out of both of these?

Many thanks!!

0
 
VanishingPointAuthor Commented:
^^^ Sorry I made a mistake with the config for Question2 - it should be:

192.168.40.1 - Main Link
172.16.10.1 - Backup link

router bgp AS_NUMBER
  neighbor 192.168.40.1 remote-as NEIGHBOR_AS_NO
  neighbor 172.16.10.1 remote-as NEIGHBOR_AS_NO
  neighbor 192.168.40.1 route-map SETMETRIC2 out
  neighbor 172.16.10.1 route-map SETMETRIC1 out
  no auto summary
!

ip route 0.0.0.0 0.0.0.0 192.168.40.1 40 -> Prefer this link for sending
ip route 0.0.0.0 0.0.0.0 172.16.10.1 50

route-map SERMETRIC1 permit 10
  set metric 100

route-map SETMETRIC2 permit 10
  set metric 50
0
 
logic2Commented:
for Q1 the answer is yes
how many times, well this comes by trial error, you put it say for 3 times, and monitor the backup link if it is still carrying incoming traffic then add more and so forth till no traffic is coming on the backup link
please note that it may take lots of times to be populated across the internet :)

Q2 this is correct but AS Path is better because AS Path comes first in BGP path selection before MED , check the below link

http://www.cisco.com/en/US/docs/internetworking/technology/handbook/bgp.html#wp1020591
0

Featured Post

What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

  • 4
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now