01-12-2012 07:48 AM - edited 03-07-2019 04:19 AM
We currently have dual routers with dual ISPs. We use AS_Path prepends to prefer one link over another inbound. I have seen the use of BGP communities to ensure the outbound uses the same path. We can't load balance because some applications we use do not "play well" when they are asynchronous. My question is which is best for outbound routing to use only one path?
Doug
01-12-2012 07:56 AM
Hi Doug,
local preference is the best option (iBGP between your routers is required).
second best is the use of weights on both routers (iBGP needed as well).
Riccardo
01-12-2012 08:00 AM
So is this a correct interrupration of your network topology?
(Internal Network)---->R1---->BGP---->ISP1
(Internal Network)---->R2---->BGP---->ISP2
Since you have applications that don't play well with asyncrhonous links, then how is your
default routing setup, since you have two different ISPs?
Depending on how your AS's are structured between the two ISPs, you could use the LOCAL_PREF
attribute.
01-12-2012 08:14 AM
We accept the default bgp route from each ISP. Your network topology is correct. We have our ASN and go to each ISP on their ASN. Check this config for my routers and see if you agree: R2 is my preferred path.
R1 ISP1
router bgp 10000
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
timers bgp 5 15
neighbor 7.7.7.7 remote-as 50
neighbor 7.7.7.7 ebgp-multihop 255
neighbor 7.7.7.7 version 4
neighbor 7.7.7.7 soft-reconfiguration inbound
neighbor 7.7.7.7 route-map Verizon-INET out
ip as-path access-list 1 permit ^50$
access-list 10 permit 1.1.1.1.0 0.0.0.255
access-list 10 permit 2.2.2.2.0 0.0.0.255
route-map Verizon-INET permit 1
match ip address 10
set as-path prepend 10000 10000 10000
set local-pref 80
------------------------------------------------------------------------
R2- ISP 2
router bgp 10000
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
timers bgp 5 15
neighbor 5.5.5.5 remote-as 75
neighbor 5.5.5.5 ebgp-multihop 255
neighbor 5.5.5.5 version 4
neighbor 5.5.5.5 soft-reconfiguration inbound
neighbor 5.5.5.5 route-map Verizon-INET out
ip as-path access-list 1 permit ^75$
access-list 10 permit 1.1.1.1.0 0.0.0.255
access-list 10 permit 2.2.2.2.0 0.0.0.255
route-map Verizon-INET permit 1
match ip address 10
set local-pref 150
01-12-2012 08:17 AM
We accept the default bgp route from each ISP. Your network topology is correct. We have our ASN and go to each ISP on their ASN. Check this config for my routers and see if you agree: R2 is my preferred path.
R1 ISP1
router bgp 10000
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
timers bgp 5 15
neighbor 7.7.7.7 remote-as 50
neighbor 7.7.7.7 ebgp-multihop 255
neighbor 7.7.7.7 version 4
neighbor 7.7.7.7 soft-reconfiguration inbound
neighbor 7.7.7.7 route-map Verizon-INET out
ip as-path access-list 1 permit ^50$
access-list 10 permit 1.1.1.1.0 0.0.0.255
access-list 10 permit 2.2.2.2.0 0.0.0.255
route-map Verizon-INET permit 1
match ip address 10
set as-path prepend 10000 10000 10000
set local-pref 80
------------------------------------------------------------------------
R2- ISP 2
router bgp 10000
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
timers bgp 5 15
neighbor 5.5.5.5 remote-as 75
neighbor 5.5.5.5 ebgp-multihop 255
neighbor 5.5.5.5 version 4
neighbor 5.5.5.5 soft-reconfiguration inbound
neighbor 5.5.5.5 route-map Verizon-INET out
ip as-path access-list 1 permit ^75$
access-list 10 permit 1.1.1.1.0 0.0.0.255
access-list 10 permit 2.2.2.2.0 0.0.0.255
route-map Verizon-INET permit 1
match ip address 10
set local-pref 150
01-12-2012 08:33 AM
Doug,
LP 150 is preferred over 80, that is true but....
1) You need to apply the route-map in ingress direction as LP is an attribute LOCAL to the AS (yours)
2) More important you miss the iBGP session between R1 and R2. Without that every router will take routing decision on its own, meaning that each of them will use its default towards its ISP link.
Riccardo
01-12-2012 08:39 AM
iBGP is on there currently, I just didn't add it to the example. So the route-map with both the prepends and the local-pref needs to be "in"?
01-12-2012 08:45 AM
well, no.
the prepend goes in outside direction (sorry I missed it earlier on) and the LP in ingress.
So you need 2 route-maps, i.e Verizon-INET-out with prepends and Verizon-INET-in with LP.
Riccardo
01-12-2012 08:48 AM
Ok. Thanks.
01-12-2012 08:47 AM
The first two attributes are weight and local_pref.
Personally I prefer the latter.
regards,
Leo
01-12-2012 09:16 AM
please rate and close the question after you test it out on your routers
Riccardo
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