03-05-2009 04:32 AM - edited 03-04-2019 03:49 AM
Hi!
I've the following issue (pls look in the attachment)
Assume I have two regions, region 1 and region 2 and there are two links between them.. Each has its own OSPF-routed network.
I want to connect this regions via BGP but i need to divide the traffic, so that
R01-1 took path A to reach network 10.9.255.1 and path B to reach network 10.9.255.10 normally and switch to alternative path only in case of main path failure.
The same thing should be on the other side. (Path A to reach 10.7.255.1 and Path B to reach 10.7.255.10)
R01-2 and R01-3 recieve the routes to networks 10.7.255.1 and 10.7.255.10 via OSPF and redistribute this routes to the BGP process and send them to AS 65001 via eBGP.
R02-2 and R02-3 recieve this routes and redistribute them to second region's OSPF. So R02-1 recieves this routes and is able to reach this networks.
The same thing with networks 10.9.255.1 and 10.9.255.10.
I've tried to divide the networks using the local preference, but it didn't work.
Here are the cfg's:
-----R01-2-----
router ospf 1
log-adjacency-changes
redistribute bgp 65000 metric-type 1 subnets
network 10.3.64.192 0.0.0.3 area 0
network 10.7.0.0 0.0.0.3 area 0
!
router bgp 65000
no synchronization
bgp default local-preference 200
bgp log-neighbor-changes
redistribute ospf 1
neighbor 10.7.0.2 remote-as 65000
neighbor 10.7.64.193 remote-as 65001
neighbor 10.7.64.193 route-map CHG_PRF in
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
access-list 1 permit 10.9.255.10
!
route-map CHG_PRF permit 10
match ip address 1
set local-preference 50
!
route-map CHG_Metric permit 50
!
----R01-3-----
router ospf 1
log-adjacency-changes
redistribute bgp 65000 metric-type 1 subnets
network 10.5.64.192 0.0.0.3 area 0
network 10.7.0.0 0.0.0.3 area 0
!
router bgp 65000
no synchronization
bgp default local-preference 150
bgp log-neighbor-changes
redistribute ospf 1
neighbor 10.7.0.1 remote-as 65000
neighbor 10.7.64.201 remote-as 65001
no auto-summary
Idea is to set default local preference on R01-2 to 200 and to 150 on R1-03 so that all trafic from AS 65000 went through PATH A because of the higher local prf. The route map at the R01-2 changes the local preference for network 10.9.255.10 and set it to 50.
R01-3 default pref is 150, so i assume the path to 10.9.255.10 will be path B.
But in fact it is not working. I'm new to the bgp world, so i need your wise advice. How it is better to be done? Using the local pref, or maybe something else.
Thx
03-05-2009 05:03 AM
Hello Dmtry,
may you post
sh ip bgp 10.9.255.10
on R01-02 and R01-03
Have you configured the route-maps in a second moment ?
It can be a problem of update refresh
If this is a lab setup you can clear the BGP sessions to see the effects
use
clear ip bgp *
on R01-02 and R01-03
Hope to help
Giuseppe
03-05-2009 12:45 PM
What if under the BGP configuration you were to remove the folowing value
bgp default local-preference 200
and leave the Local Pref as default = 100, and under the neighbor config
neighbor 10.7.64.193 route-map CHG_PRF
route-map CHG_PRF permit 10
match ip address 1
set local-preference 200 (Preffered path)
The Higher Local Pref value is preffered in the BGP table.
03-06-2009 02:09 AM
Thank you for your replies.
Got it after the sh ip bgp 10.9.255.1 command. The second route was in bgp table but the next hop was "inaccessible".
So, i've added border interfaces to the OSPF, so the stuff is working now.
The same result can be achieved with the next-hop-self command.
But it is still a question, is it optimal to divide the traffic this way?
03-06-2009 03:26 AM
Hello Dmtri,
BGP allows for this fine control of what path to use for a specific destination.
This allows for some form of control of how much traffic go over two parallel paths.
Without any manipulation you can have one path used for all traffic and one idle
Hope to help
Giuseppe
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