09-23-2013 03:29 AM - edited 03-04-2019 09:07 PM
Hello,
I have built (too you guys) a very simple BGP lab in GNS3, I'm doing this to understand path selection. At the moment if host (172.30.2.11) pings host 2 (192.168.90.11) it goes via R3 to R2, which is right when all the BGP default attributes are the kept. How would you get the traffic to go via R3 > R1 > R2 instead and visa versa?
Thanks
Solved! Go to Solution.
09-23-2013 06:39 AM
Yes, you'll need to configure R3 -> R1 to be the preferred path if you're wanting to change the path from the host's perspective. On R3, you'd configure "neighbor
HTH,
John
*** Please rate all useful posts ***
09-23-2013 04:00 AM
Andy,
On R3, you could change local pref or weight to a higher value for R1 instead of R2.
HTH,
John
*** Please rate all useful posts ***
09-23-2013 04:03 AM
Is it best to use a route map for this, I'm just trying to work out how I tie it to an interface?
09-23-2013 04:08 AM
If you're going to use weight, and you want all of you traffic to go a certain path, you can specify the weight directly on the neighbor. If you're going to use local-pref or set weights on specific prefixes, you'd want to use a route map for that.
HTH,
John
*** Please rate all useful posts ***
09-23-2013 05:45 AM
Thanks let me try this. If I had another subnet off R2 and I wanted traffic to each subnet to take separate paths I should just use a route map and prefix list?
09-23-2013 06:00 AM
Hi,
I must be doing something wrong as the path is still going from R3 > R2 when going to 192.168.90.11
This is wha I did:
R3(config)#router bgp 100
R3(config-router)#neighbor 172.12.123.6 weight 110
R3(config-router)#exit
R3(config)#exit
R3#clear ip bgp * soft
R3#sh ip bgp 192.168.90.11
BGP routing table entry for 192.168.90.0/24, version 19
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x800
Advertised to update-groups:
1
200
172.12.123.6 from 172.12.123.6 (2.2.2.2)
Origin IGP, metric 0, localpref 100, weight 110, valid, external, best
200
172.12.123.2 from 172.12.123.4 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal
R3#
Host5#traceroute 192.168.90.11
Type escape sequence to abort.
Tracing the route to 192.168.90.11
1 172.30.2.1 48 msec 36 msec 20 msec
2 172.12.123.6 40 msec 36 msec 40 msec
3 192.168.90.11 40 msec * 24 msec
Host5#
09-23-2013 06:27 AM
Hi Andy,
The weight is 0 by default. By setting the weight to 110 on neighbor R2, you are effectively preferring it over the other neighbor (R1). You should set the weight on neighbor R1 instead.
Regards
09-23-2013 06:39 AM
Yes, you'll need to configure R3 -> R1 to be the preferred path if you're wanting to change the path from the host's perspective. On R3, you'd configure "neighbor
HTH,
John
*** Please rate all useful posts ***
09-24-2013 08:14 AM
Thanks for your elp.
How woud l now use a local pref? Can you give me an example using the route-map/prefix?
I'm reading about the route reflector, very clever stuff to bend the rules.
Kind Regards
09-24-2013 09:36 AM
Local pref is set in the route map. If you want to prefer one prefix, you can math with an acl or prefix list.
Ip prefix-list Allow permit 192.168.1.0/24
Route-map Allow permit 10
Match IP address prefix Allow
Set local-pref 200
Route-map Allow permit 20
Under your bgp process you could apply this route map inbound or outbound.
I'm doing this from my phone, so please excuse any syntax errors :)
Sent from Cisco Technical Support iPhone App
09-23-2013 06:58 AM
Also if you are planning to use local preference with your current topology assuming that R1 and R2 and R3 all are connected to each other and ur trying to reach 192.168.90.0 from R3 - R1 - R2 instead of R3-R2 direct, if you try to change local preference on R3 for 192.168.90.0 subnet while update is hitting R3 from R2 to lower local pref so that R3-R1-R2 would have a higher local pref thus will be chosen as best path then i believe that would be wrong because updates about 192.168.90.0 would be sent from R2 to R1 and stop since there is no Route-Reflector configured.
---
Posted by WebUser Marwan Hassan from Cisco Support Community App
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