BGP prepending and local preference question



Currently we have 2 routers connected by a point to point line which
are themselves connected to different providers. This is to establish
failover if the primary location A provider fails we would still have
availability in Location B of both of our subnets. We advertise both
subnets in both locations. This has provided us neary equal load
balancing across both providers.
However, we would like to have the majority, if not all of our traffic
(in & out) using the preferred provider in location A unless the
preferred provider or location A failed in which case location B and
the backup provider would take over. I have seen several articles and
postings on how to do this, and believe that a combination of local
preference and AS prepending will take care of this but BGP is not my
strong suit so I am looking for verification that my proposal is
correct. Below is a brief diagram as well as the current routing
configs and the proposed ones. Do I have this correct or is more
needed? As always thank you and if more info is needed, please let me
know.

Location A Rtr
(x.x.x.0) ---------------------EBGP-----------PreferredProvider
(b.b.b.b)
|
OSPF (z.z.z.0)
|
Location B Rtr
(y.y.y.0)---------------------EBGP-----------BackupProvider (a.a.a.a)



Existing Routing configs:
--------------------------------------------------------------------------------------
LOCATION A

router ospf 1
log-adjacency-changes
network x.x.x.0 0.0.0.255 area 0
network z.z.z.0 0.0.0.3 area 0
!
router bgp myasnumber
no synchronization
bgp log-neighbor-changes
bgp dampening
network x.x.x.0 mask 255.255.255.0
redistribute ospf 1
neighbor b.b.b.b remote-as preferredprovider
neighbor b.b.b.b distribute-list ADVERTISE out
neighbor z.z.z.1 remote-as myasnumber
neighbor z.z.z.1 next-hop-self
no auto-summary

ip access-list extended ADVERTISE
permit ip x.x.x.0 0.0.0.255 any
permit ip y.y.y.0 0.0.0.255 any
--------------------------------------------------------------------------------------
LOCATION B
router ospf 1
log-adjacency-changes
network y.y.y.0 0.0.0.255 area 0
network z.z.z.0 0.0.0.3 area 0

router bgp myasnumber
bgp log-neighbor-changes
neighbor a.a.a.a remote-as backupprovider
neighbor a.a.a.a ebgp-multihop 2
neighbor a.a.a.a update-source Loopback0
neighbor z.z.z.2 remote-as myasnumber
address-family ipv4
redistribute ospf 1 metric 1
neighbor a.a.a.a activate
neighbor a.a.a.a send-community
neighbor a.a.a.a soft-reconfiguration inbound
neighbor a.a.a.a distribute-list advertised_network out
neighbor z.z.z.2 activate
neighbor z.z.z.2 next-hop-self
no auto-summary
no synchronization
bgp dampening
network y.y.y.0 mask 255.255.255.0
exit-address-family

ip access-list extended advertised_network
permit ip y.y.y.0 0.0.0.255 any
permit ip x.x.x.0 0.0.0.255 any
--------------------------------------------------------------------------------------

Proposed Changes indicated by ***
--------------------------------------------------------------------------------------
LOCATION A

router ospf 1
log-adjacency-changes
network x.x.x.0 0.0.0.255 area 0
network z.z.z.0 0.0.0.3 area 0
!
router bgp myasnumber
no synchronization
bgp log-neighbor-changes
bgp dampening
network x.x.x.0 mask 255.255.255.0
redistribute ospf 1
neighbor b.b.b.b remote-as preferredprovider
neighbor b.b.b.b distribute-list ADVERTISE out
neighbor z.z.z.1 remote-as myasnumber
neighbor z.z.z.1 next-hop-self
no auto-summary
*** bgp default local-preference 200

ip access-list extended ADVERTISE
permit ip x.x.x.0 0.0.0.255 any
permit ip y.y.y.0 0.0.0.255 any\
--------------------------------------------------------------------------------------
LOCATION B

router ospf 1
log-adjacency-changes
network y.y.y.0 0.0.0.255 area 0
network z.z.z.0 0.0.0.3 area 0

router bgp myasnumber
bgp log-neighbor-changes
neighbor a.a.a.a remote-as backupprovider
neighbor a.a.a.a ebgp-multihop 2
neighbor a.a.a.a update-source Loopback0
neighbor z.z.z.2 remote-as myasnumber
address-family ipv4
redistribute ospf 1 metric 1
neighbor a.a.a.a activate
neighbor a.a.a.a send-community
neighbor a.a.a.a soft-reconfiguration inbound
neighbor a.a.a.a distribute-list advertised_network out
*** neighbor a.a.a.a route-map Traffic-out out
neighbor z.z.z.2 activate
neighbor z.z.z.2 next-hop-self
no auto-summary
no synchronization
bgp dampening
network y.y.y.0 mask 255.255.255.0
exit-address-family

ip access-list extended advertised_network
permit ip y.y.y.0 0.0.0.255 any
permit ip x.x.x.0 0.0.0.255 any

*** route-map Traffic-out permit 10
*** set as-path prepend myasnumber myasnumber

.



Relevant Pages

  • How does BGP work?
    ... ISP, and BGP is is setup between the ISP and eash site: ... The problem I have is when I do a traceroute from the external router ... neighbor vvv.vvv.vvv.1 soft-reconfiguration inbound ...
    (comp.dcom.sys.cisco)
  • OSPF routes not becomming active until a router has failed
    ... Each server has one connection into each switch, and each router has a ... Metric was 50 Nexthop 10.36.17.5 ... neighbor 10.36.16.5 ... 11:11:52 T2: Neighbor 10.36.16.5 Event: Inactivity Timer State change ...
    (microsoft.public.windows.server.networking)
  • BGP configuration with local preference
    ... Router A is peering with Router B via EBGP ... Router C will have all advertised routes set with an AS ... Redistributing BGP Into OSPF ... neighbor 10.10.10.1 update-source Loopback0 ...
    (comp.dcom.sys.cisco)
  • a Strange Problem of EIGRP
    ... My client's network was interrupted recently because his ... router both in eigrp as 1 and eigrp as 65000. ... my client manually clear eigrp neighbor with R3. ...
    (comp.dcom.sys.cisco)
  • Re: BGP And Load Balancing With Two Routers
    ... If the network isn't advertised by Sprint, then traffic will have to go ... > Router A and B, then interconnect with a patch cable. ... As Qwest is only a 10Meg pipe I would like to ... > neighbor 160.81.248.77 description ebgp link to sprint ...
    (comp.dcom.sys.cisco)