01-02-2024 08:23 AM
I currently have a internet router at location A with BGP enabled. We now plan to bring up another BGP enabled router at another location. Both will use the same ISP. The two locations are linked together with a MAN link. How do I make the router at location A the primary and location B backup in case the link at location A fails?
01-02-2024 08:26 AM
You receive bgp defualt from ISP'
So first config ibgp between router A and B
Then config in router A local preference.
So if traffic go to routerB it will redirect it to router A.
MHM
01-02-2024 08:47 AM
There is a variety of possible scenarios for the BGP, so i will simplify it here assuming that you dont run Full BGP with ISP, and Location A is primary while B is the redundant location. Note that i'm not covering the FHRP for the LAN side unless you have a distribution layer below.
Ingress
Add AS to AS-Path on outgoing prefixes on Location B towards ISP
Egress
Setup Higher Local preference from prefixes received from ISP on Primary Location
You must have Internal BGP between routers at Location A & B through the MAN link
01-02-2024 09:30 AM - edited 01-02-2024 09:36 AM
Hello @geocoles
As concerned inbound flow, at the router in Location B (secondary), prepend its AS number in the AS-path sent to the ISP. This will make the route less attractive to the ISP.
For outbound flow, set a higher local preference for routes received at Location A, making it more preferable than routes received at Location B.
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
01-02-2024 10:40 AM
This is the BGP config in the primary, it was configured by a consultant many years ago. The backup, I assume, should be almost identical, with the exception of the ip endpoints:
router bgp 10753
bgp log-neighbor-changes
neighbor 4.35.114.225 remote-as 3356
neighbor 4.35.114.225 description CLink 250mb
!
address-family ipv4
network 64.211.68.208 mask 255.255.255.240
network 199.76.44.160 mask 255.255.255.248
network 208.51.30.144 mask 255.255.255.240
redistribute connected
neighbor 4.35.114.225 activate
neighbor 4.35.114.225 soft-reconfiguration inbound
neighbor 4.35.114.225 route-map LOCAL-PREF-150 in
exit-address-family
ip route 0.0.0.0 0.0.0.0 4.35.114.225
ip route 10.1.0.0 255.255.0.0 64.211.68.210
ip route 10.1.40.5 255.255.255.255 64.211.68.210
ip route 64.211.68.211 255.255.255.255 64.211.68.215
ip route 199.76.44.160 255.255.255.248 64.211.68.210
ip route 208.51.30.144 255.255.255.240 64.211.68.210
ip access-list extended PERMIT-ALL
permit ip any any
route-map BGP-POLICY-BACKUP-OUT permit 10
match ip address PERMIT-ALL
set as-path prepend 10753 10753 10753 10753 10753 10753
!
route-map LOCAL-PREF-150 permit 10
match ip address PERMIT-ALL
set local-preference 150
!
01-02-2024 10:56 AM
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13768-hsrp-bgp.html
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
These two doc. Read it' it will give you good view about config you need
MHM
01-02-2024 01:44 PM - edited 01-02-2024 01:45 PM
Hello
The configuration you posted doesn't reflect the topology diagram, For instance the primary location you show as having a single ebgp peer but its utilising bgp Local preference and what looks like an historic route-map for as-path pre-pending but no other routing process.
However the topology shows that location having dual internet and mpls connections which suggests you have more than just a single router running bgp that is performing routing.
Can you elaborate further on the existing topology please especially around those dual wan connections and the man link
01-15-2024 07:46 AM
After thinking about it, I made a change to the diagram, sending the backup location traffic to the router handling the MAN. I think it would work better.
Like I mentioned, this config was done by a consultant years ago. While the MPLS router does have BGP, it is using a different AS number and very simplistic
router bgp 10753
bgp log-neighbor-changes
redistribute ospf 2
neighbor 100.90.56.109 remote-as 3549
01-15-2024 07:55 AM
You use MAN to interconnect l2 vlan between two DC site?
MHM
01-15-2024 10:01 AM
L3 between sites
01-15-2024 10:02 AM
10.1.x.x is at the primary site
10.216.x.x at the backup site
10.246.1.x for the MAN
01-15-2024 10:05 AM
Perfect
so you can run iBGP between two Site
in backup make the primary or direct WAN is prefer.
if the primary in location down the traffic will auto go via MAN to backup location B.
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide