Re: Inject Map

From: Muzammil Malick <malickmuz_at_gmail.com>
Date: Mon, 18 Oct 2010 11:03:04 +0100

Steven not sure what you are doing wrong here but I copied your setup
and it works fine for me:

R2 - - - - - -R1 - - - - - R3
AS 200 AS100 AS100

R3 is originating the 33.33.33.0/24 network using a loopback address
with network command.
After the inject-map is added, the /32 route can be seen on R1 and R2
(ebgp peer)

See configs below

R1

interface Loopback0
 ip address 24.234.1.1 255.255.255.255

interface FastEthernet1/0
desc Connection to R2
 ip address 10.0.0.1 255.255.255.0
!
interface FastEthernet1/1
desc Connection to R3
 ip address 11.0.0.1 255.255.255.0

router eigrp 10
 network 10.0.0.1 0.0.0.0
 network 11.0.0.1 0.0.0.0
 network 24.234.1.1 0.0.0.0
 no auto-summary
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 bgp inject-map ORIGINATE exist-map LEARNED
 neighbor 24.234.2.2 remote-as 200
 neighbor 24.234.2.2 ebgp-multihop 255
 neighbor 24.234.2.2 update-source Loopback0
 neighbor 24.234.3.3 remote-as 100
 neighbor 24.234.3.3 update-source Loopback0
 no auto-summary

ip prefix-list HOST seq 5 permit 33.33.33.33/32
!
ip prefix-list ROUTE seq 5 permit 33.33.33.0/24
!
ip prefix-list SOURCE seq 5 permit 24.234.3.3/32

route-map ORIGINATE permit 10
 set ip address prefix-list HOST
!
route-map LEARNED permit 10
 match ip address prefix-list ROUTE
 match ip route-source prefix-list SOURCE

R2

interface Loopback0
 ip address 24.234.2.2 255.255.255.255

interface FastEthernet1/0
Desc Connection to R1
 ip address 10.0.0.2 255.255.255.0

router eigrp 10
 network 10.0.0.2 0.0.0.0
 network 24.234.2.2 0.0.0.0
 no auto-summary
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 neighbor 24.234.1.1 remote-as 100
 neighbor 24.234.1.1 ebgp-multihop 255
 neighbor 24.234.1.1 update-source Loopback0
 no auto-summary

R3

interface Loopback0
 ip address 24.234.3.3 255.255.255.255
!
interface Loopback1
 ip address 33.33.33.33 255.255.255.0

interface FastEthernet1/0
desc Connection to R1
 ip address 11.0.0.3 255.255.255.0

router eigrp 10
 network 11.0.0.3 0.0.0.0
 network 24.234.3.3 0.0.0.0
 no auto-summary
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 33.33.33.0 mask 255.255.255.0
 neighbor 24.234.1.1 remote-as 100
 neighbor 24.234.1.1 update-source Loopback0
 no auto-summary

R1#sh ip bgp
BGP table version is 3, local router ID is 24.234.1.1
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
*>i33.33.33.0/24 24.234.3.3 0 100 0 i
*>i33.33.33.33/32 24.234.3.3 0 ?

R2#sh ip bgp
BGP table version is 5, local router ID is 24.234.2.2
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
*> 33.33.33.0/24 24.234.1.1 0 100 i
*> 33.33.33.33/32 24.234.1.1 0 100 ?

HTH

On 18 October 2010 02:32, Steven Blasiol <steven.blasiol_at_gmail.com> wrote:
> No, I don't. Maybe this is where the breakdown is. The way I understood it
> as long as the /24 route was in the routing table then the router would
> originate the /32 route. Why even use the inject-map if this isn't the
> case? Why not just advertise the /32 to the eBGP neighbor if it is in the
> routing table? Or just advertise it on the iBGP peer?
>
> On Sun, Oct 17, 2010 at 9:24 PM, garry baker <baker.garry_at_gmail.com> wrote:
>
>> do you have the /32 in this routers bgp table to propagate to the ebgp
>> peer?
>>
>>
>> --
>> Garry L. Baker
>>
>> "There is no 'patch' for stupidity." - www.sqlsecurity.com
>>
>>
>> On Sun, Oct 17, 2010 at 8:09 PM, Steven Blasiol
> <steven.blasiol_at_gmail.com>wrote:
>>
>>> I am still doing something wrong. Below is my new configuration, this
>>> router is learning this route from an iBGP neighbor, but when I look at
> the
>>> eBGP neighbor peered to this router I see the 33.33.33.0/24 route, but
>>> not the 33.33.33.33/32 route. Does anyone see anything wrong with this?
>>> I did a clear ip bgp * and still the same...
>>>
>>> Thanks,
>>>
>>> router bgp 100
>>>
>>> no synchronization
>>> bgp log-neighbor-changes
>>> bgp inject-map ORIGINATE exist-map LEARNED copy-attributes
>>> network 11.11.11.0 mask 255.255.255.0
>>> neighbor 24.234.2.2 remote-as 200
>>> neighbor 24.234.2.2 ebgp-multihop 255
>>> neighbor 24.234.2.2 update-source Loopback0
>>> neighbor 24.234.3.3 remote-as 100
>>> neighbor 24.234.3.3 update-source Loopback0
>>> no auto-summary
>>> !
>>> !
>>> !
>>> ip prefix-list HOST seq 5 permit 33.33.33.33/32
>>> !
>>> ip prefix-list ROUTE seq 5 permit 33.33.33.0/24
>>> !
>>> ip prefix-list SOURCE seq 5 permit 24.234.3.3/32
>>> !
>>> !
>>> !
>>> route-map ORIGINATE permit 10
>>> match ip address prefix-list HOST
>>> !
>>> route-map LEARNED permit 10
>>> match ip address prefix-list ROUTE
>>> match ip route-source prefix-list SOURCE
>>> !
>>>
>>>
>>>
>>> On Sun, Oct 17, 2010 at 7:14 PM, garry baker <baker.garry_at_gmail.com>wrote:
>>>
>>>> you need the *match ip route-source* in your route-map EXISTS*
>>>>
>>>> *
>>>>
> http://www.cisco.com/en/US/docs/ios/iproute_bgp/configuration/guide/irg_basic
> _net_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1055919
>>>>
>>>> Specifies the match conditions for redistributing the source of the
>>>> route.
>>>>
>>>> In this example, the prefix list named ROUTE_SOURCE is used to
>>>> redistribute the source of the route.
>>>>
>>>> *Note *The route source is the neighbor address that is configured with
>>>> the *neighbor remote-as* command. The tracked prefix must come from this
>>>> neighbor in order for conditional route injection to occur.
>>>>
>>>>
>>>> --
>>>> Garry L. Baker
>>>>
>>>> "There is no 'patch' for stupidity." - www.sqlsecurity.com
>>>>
>>>>
>>>> On Sun, Oct 17, 2010 at 5:12 PM, Steven Blasiol <
>>>> steven.blasiol_at_gmail.com> wrote:
>>>>
>>>>> Experts,
>>>>>
>>>>> I am having some problems with an inject map and would appreciate some
>>>>> help:
>>>>>
>>>>> router bgp 23
>>>>> no synchronization
>>>>> bgp log-neighbor-changes
>>>>> bgp inject-map INJECT exist-map EXISTS copy-attributes
>>>>> network 24.234.32.0 mask 255.255.255.0
>>>>> aggregate-address 24.0.0.0 255.0.0.0 summary-only
>>>>> redistribute ospf 1 route-map OSPF
>>>>> neighbor 155.60.1.1 remote-as 10
>>>>> neighbor 155.60.1.1 ebgp-multihop 255
>>>>> neighbor 155.60.1.1 update-source Loopback0
>>>>> neighbor 155.60.1.1 weight 3000
>>>>> neighbor 155.60.3.3 remote-as 23
>>>>> neighbor 155.60.3.3 update-source Loopback0
>>>>> neighbor 155.60.3.3 next-hop-self
>>>>> neighbor 155.60.3.3 route-map LOCALPREF in
>>>>> no auto-summary
>>>>> !
>>>>> ip prefix-list EXISTS seq 5 permit 33.33.33.0/24
>>>>> !
>>>>> ip prefix-list INJECT seq 5 permit 33.33.33.33/32
>>>>> !
>>>>> route-map EXISTS permit 10
>>>>> match ip address prefix-list EXISTS
>>>>> !
>>>>> route-map INJECT permit 10
>>>>> set ip address prefix-list INJECT
>>>>>
>>>>> When I look at routers that are peered to this router I can see
>>>>> 33.33.33.0/24 (33.33.33.33 is a loopback on this router) but I do not
>>>>> see
>>>>> the 33.33.33.33/32
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Steven M. Blasiol
>>>>>
>>>>>
>>>>> Blogs and organic groups at http://www.ccie.net
>>>>>
>>>>> _______________________________________________________________________
>>>>> Subscription information may be found at:
>>>>> http://www.groupstudy.com/list/CCIELab.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Steven M. Blasiol
>>>
>>
>>
>
>
> --
> Steven M. Blasiol
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Mon Oct 18 2010 - 11:03:04 ART

This archive was generated by hypermail 2.2.0 : Mon Nov 01 2010 - 06:42:06 ART