10-29-2007 05:06 AM - edited 03-03-2019 05:30 AM
Hi all. I have 2 routers running BGP(they are in the same AS) but each one has a different ISP connected on him.
I'm trying to force the traffic going to some specific networks that are now going over one link to go out the other link.
I was thinking of putting static routes to these networks on the router I want the traffic go out.
But I was wondering should I distribute these static routes through iBGP to the other router or should I put static routes on the other router that will point to the router I want the traffic to go out?
Thanks for any advice.
Solved! Go to Solution.
10-29-2007 05:28 AM
Hi,
For outgoing traffic from your router u can use the Local Preference BGP attribute. It is the easiest to implement.
Use
Local preference for outgoing traffic
AS Prepend for incoming traffic
sample config:-
pri router
router bgp xyz
network abc
no synchronization
bgp log-neighbor-changes
neighbor
neighbor
neighbor
neighbor
neighbor
ip as-path access-list 1 permit ^pri-AS number$
route-map 321 permit 10
match as-path 1
set local-preference 200
Second router:-
router bgp
no synchronization
no bgp log-neighbor-changes
network
neighbor
neighbor
neighbor
neighbor
neighbor
no auto-summary
route-map sec_link-Backup permit 10
match ip address prefix-list yourcompany
set as-path prepend
ip prefix-list yourcompany seq 5 permit
10-29-2007 05:16 AM
Hi Igor
if you are running IGBP between your 2 routers then you should look to use local preference within your AS which will prefer one exit point over another per route but will still fall back to the other exit point if a link goes down. See attached doc for explanation of local preference.
if you are not running IBGP between your 2 routers you could use static routes but i don't think this is as clean or flexible.
HTH
Jon
10-29-2007 05:28 AM
Hi,
For outgoing traffic from your router u can use the Local Preference BGP attribute. It is the easiest to implement.
Use
Local preference for outgoing traffic
AS Prepend for incoming traffic
sample config:-
pri router
router bgp xyz
network abc
no synchronization
bgp log-neighbor-changes
neighbor
neighbor
neighbor
neighbor
neighbor
ip as-path access-list 1 permit ^pri-AS number$
route-map 321 permit 10
match as-path 1
set local-preference 200
Second router:-
router bgp
no synchronization
no bgp log-neighbor-changes
network
neighbor
neighbor
neighbor
neighbor
neighbor
no auto-summary
route-map sec_link-Backup permit 10
match ip address prefix-list yourcompany
set as-path prepend
ip prefix-list yourcompany seq 5 permit
11-13-2007 12:46 AM
Thanks for your great advice guys. Did something similar to your suggestions and works fine.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: