Re: Question on Influencing BGP Inbound Path Selection

From: YourPal (dearprudence28@gmail.com)
Date: Thu Mar 13 2008 - 09:51:22 ARST


Hi Shine,

Thanks for the great solution. Probably typo error, but I believe your
route-map ORIGIN_R4 should set origin igp as follows:

!
route-map ORIGIN_R4 permit 10
 match ip address prefix-list NET_3
 set origin igp
!

Also agree with Andy's solution. His differs only in how the prefixes are
originated into BGP and set to origin incomplete.

Sigh, I confine myself too much into thinking that we should only manipulate
AS path or MED to influence incoming traffic. There is origin code, sitting
in between AS Path and MED in BGP bestpath selection algorithm :)

Thank you guys!

BR,
Emil

On 3/13/08, Shine Joseph <shinepjoseph@iprimus.com.au> wrote:
>
> Emil,
>
>
>
> See below working configuration as per the requirement you have provided.
>
> I have labbed up as follows.
>
> The loopback prefixes are advertised with a route-map to convert them into
> incomplete origin (?). On R1 a new route-map is created to change the origin
> codes to IGP just for R1 and R3 loopbacks.
>
>
>
> R1
>
> router bgp 123
>
> no synchronization
>
> bgp router-id 150.1.1.1
>
> bgp log-neighbor-changes
>
> network 172.16.1.1 mask 255.255.255.255 route-map ORIGIN_R1
>
> neighbor 172.16.13.3 remote-as 123
>
> neighbor 172.16.14.4 remote-as 456
>
> neighbor 172.16.14.4 route-map ORIGIN out
>
> neighbor 172.16.123.2 remote-as 123
>
> no auto-summary
>
>
>
> ip prefix-list NET_3 seq 5 permit 172.16.3.3/32
>
> ip prefix-list NET_3 seq 10 permit 172.16.1.1/32
>
>
>
> route-map ORIGIN_R1 permit 10
>
> set origin incomplete
>
>
>
> route-map ORIGIN_R4 permit 10
>
> match ip address prefix-list NET_3
>
> set origin incomplete
>
>
>
>
>
> R2
>
> router bgp 123
>
> no synchronization
>
> bgp router-id 150.1.2.2
>
> bgp log-neighbor-changes
>
> network 172.16.2.2 mask 255.255.255.255
>
> neighbor 172.16.23.3 remote-as 123
>
> neighbor 172.16.23.3 next-hop-self
>
> neighbor 172.16.24.4 remote-as 456
>
> neighbor 172.16.123.1 remote-as 123
>
> no auto-summary
>
>
>
>
>
> R3
>
> router bgp 123
>
> no synchronization
>
> bgp router-id 150.1.3.3
>
> bgp log-neighbor-changes
>
> network 172.16.3.3 mask 255.255.255.255 route-map ORIGIN
>
> neighbor 172.16.13.1 remote-as 123
>
> neighbor 172.16.23.2 remote-as 123
>
> no auto-summary
>
>
>
> route-map ORIGIN permit 10
>
> set origin incomplete
>
>
>
> R3
>
> sh ip bgp
>
> BGP table version is 14, local router ID is 150.1.3.3
>
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
>
> r RIB-failure, S Stale
>
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>
>
> Network Next Hop Metric LocPrf Weight Path
>
> r>i172.16.1.1/32 172.16.13.1 0 100 0 ?
>
> r>i172.16.2.2/32 172.16.23.2 0 100 0 i
>
> *> 172.16.3.3/32 0.0.0.0
>
>
>
> R4
>
> sh run | s bgp
>
> router bgp 456
>
> no synchronization
>
> bgp router-id 150.1.4.4
>
> bgp log-neighbor-changes
>
> neighbor 172.16.14.1 remote-as 123
>
> neighbor 172.16.24.2 remote-as 123
>
> no auto-summary
>
>
>
> R4
>
> sh ip bgp
>
> BGP table version is 10, local router ID is 150.1.4.4
>
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
>
> r RIB-failure, S Stale
>
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>
>
> Network Next Hop Metric LocPrf Weight Path
>
> *> 172.16.1.1/32 172.16.14.1 0 0 123 i
>
> * 172.16.24.2 0 123 ?
>
> *> 172.16.2.2/32 172.16.24.2 0 0 123 i
>
> *> 172.16.3.3/32 172.16.14.1 0 123 i
>
> * 172.16.24.2 0 123 ?
>
>
>
> R4(config-router)#do trace 172.16.3.3
>
>
>
> Type escape sequence to abort.
>
> Tracing the route to 172.16.3.3
>
>
>
> 1 172.16.14.1 24 msec 24 msec 24 msec
>
> 2 172.16.13.3 52 msec * 48 msec
>
> R4(config-router)#
>
> R4(config-router)#do trace 172.16.1.1
>
>
>
> Type escape sequence to abort.
>
> Tracing the route to 172.16.1.1
>
>
>
> 1 172.16.14.1 28 msec * 24 msec
>
> R4(config-router)#
>
> R4(config-router)#
>
> R4(config-router)#do trace 172.16.2.2
>
>
>
> Type escape sequence to abort.
>
> Tracing the route to 172.16.2.2
>
>
>
> 1 172.16.24.2 28 msec * 24 msec
>
>
>
> HTH,
>
> Shine
> ------------------------------
>
> *From:* YourPal [mailto:dearprudence28@gmail.com]
> *Sent:* Thursday, 13 March 2008 9:36 PM
> *To:* Shine Joseph
> *Cc:* Cisco certification
> *Subject:* Re: Question on Influencing BGP Inbound Path Selection
>
>
>
> Hi All,
>
> Those 3 prefixes are loopback addresses of the respective router. They are
> not advertised in IGP.
>
> An earlier task asks to advertise those loopbacks into BGP with no
> restriction. Then comes this task that restricts configuration on R1 only.
> Is it possible at all? I still think that we need to configure something on
> R2 (whether setting MED, community, origin code, etc) in order to satisfy
> this task, if that's allowed at all.
>
>
> Thank you.
>
> BR,
> Emil
>
>
>
> On 3/13/08, *Shine Joseph* <shinepjoseph@iprimus.com.au> wrote:
>
> Emil,
>
> The fact that origin code is ahead of MED in best path calculation, you
> can
> change the origin code to accomplish this task.
>
> If there is no restriction in how you advertise the networks in AS123, I
> can
> think of advertising the network with origin code of igp to R4 from R1. If
> you are restricted with no-redistribution, then apply a route-map in the
> network statement to change the origin code to incomplete.
>
> I have labbed up your scenario and it works.
>
> HTH,
> Shine
>
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> YourPal
> Sent: Thursday, 13 March 2008 5:19 PM
> To: Cisco certification
> Subject: Question on Influencing BGP Inbound Path Selection
>
> Hi Group,
>
> I came across the following BGP scenario:
>
> R1, R2, and R3 are in AS 123. They are fully-meshed. R4 is in AS 456. R4
> peers with R1 and R2.
>
> R1 advertises 172.16.1.1/32 into BGP.
> R2 advertises 172.16.2.2/32 into BGP.
> R3 advertises 172.16.3.3/32 into BGP.
>
> Configure R1 so that R4 prefers R1 to reach 172.16.1.1/32 and
> 172.16.3.3/32.
> Route filtering and AS path manipulation are prohibited.
>
> The way I see it, I'm left with the option of configuring MED. However
> since
> the task restricts the config to be done on only R1, AFAIK there's no way
> to
> influence MED because both R1 and R2 will advertise the prefixes to R4
> with
> MED=0 (unless I'm allowed to configure a higher MED value on R2).
>
> Can't think of a solution. I may be missing something. Appreciate any
> help.
>
>
> Thank you.
>
> BR,
> Emil
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Tue Apr 01 2008 - 07:53:53 ART