Re: Tag BGP external routes?

From: Ivan Hrvatska <ivanzghr_at_gmail.com>
Date: Tue, 23 Mar 2010 14:56:17 +0100

OK. So we came to conclusion that set tag under route-map should work, right?

On Tue, Mar 23, 2010 at 2:45 PM, Mirco Orlandi <mirco.orlandi_at_gmail.com> wrote:
> ok Ivan. Same config, different result.
>
> router ospf 1
> redistribute eigrp 100 subnets route-map set-tag
>
> SW2#sh route-map set-tag
> route-map set-tag, permit, sequence 10
> Match clauses:
> tag 254
> Set clauses:
> tag 999
> Policy routing matches: 0 packets, 0 bytes
> route-map set-tag, permit, sequence 100
> Match clauses:
> Set clauses:
> Policy routing matches: 0 packets, 0 bytes
> SW2#
> SW2#sh ip eigrp topology | include 10.0.0.5
> P 10.0.0.5/32, 1 successors, FD is 1275392, tag is 254
> SW2#
> SW2#sh ip ospf database | include 10.0.0.5
> 10.0.0.5 10.0.0.1 202 0x80000002 0x005248 999
>
> -mirco.
>
> On Tue, Mar 23, 2010 at 12:38 PM, Ivan Hrvatska <ivanzghr_at_gmail.com> wrote:
>>
>> BB3 instead of BB1
>>
>> SW2(OSPF, EIGRP 100) ----------------- BB3(EIGRP 100, BGP
>> 253)-------------BB2(BGP 254)
>>
>>
>> BB3:
>> !
>> router eigrp 100
>> redistribute bgp 253 metric 1 1 1 1 1
>> network 9.9.33.0 0.0.0.255
>> network 198.3.0.0 0.0.255.255
>> no auto-summary
>> !
>> router bgp 253
>> no synchronization
>> bgp log-neighbor-changes
>> neighbor 1.1.23.2 remote-as 254
>> no auto-summary
>> !
>>
>> SW2:
>> !
>> router eigrp 100
>> network 9.9.33.0 0.0.0.255
>> no auto-summary
>> !
>> router ospf 1
>> log-adjacency-changes
>> summary-address 198.3.0.0 255.255.248.0
>> redistribute eigrp 100 subnets route-map TAG
>> network 9.9.8.8 0.0.0.0 area 1
>> network 9.9.234.8 0.0.0.0 area 1
>> network 9.9.243.8 0.0.0.0 area 1
>> !
>> ip classless
>> no ip http server
>> no ip http secure-server
>> !
>> !
>> !
>> route-map TAG permit 10
>> match tag 254
>> set tag 999
>> !
>> route-map TAG permit 90
>> !
>>
>>
>>
>>
>> On Tue, Mar 23, 2010 at 11:00 AM, Mirco Orlandi <mirco.orlandi_at_gmail.com>
>> wrote:
>> > Could be, but it is better to make one last check. Can you post also:
>> > - eigrp topology
>> > - ospf and eigrp config sections
>> > - route-map
>> >
>> > -m.
>> >
>> > On Tue, Mar 23, 2010 at 10:41 AM, Ivan Hrvatska <ivanzghr_at_gmail.com>
>> > wrote:
>> >>
>> >> Hmm...This is my OSPF database output:
>> >>
>> >> Type-5 AS External Link States
>> >>
>> >> Link ID ADV Router Age Seq# Checksum Tag
>> >> 9.9.33.0 9.9.8.8 4 0x80000001 0x0097B3 0
>> >> 99.99.1.0 9.9.8.8 5 0x80000001 0x0014A3 254
>> >> 99.99.2.0 9.9.8.8 5 0x80000001 0x0009AD 254
>> >> 99.99.3.0 9.9.8.8 5 0x80000001 0x00FDB7 254
>> >> 99.99.4.0 9.9.8.8 5 0x80000001 0x00F2C1 254
>> >> 99.99.5.0 9.9.8.8 5 0x80000001 0x00E7CB 254
>> >> 198.3.0.0 9.9.8.8 5 0x80000001 0x008635 0
>> >>
>> >> This is an output on another SW in OSPF domain.
>> >> Software in SW2 is:
>> >> c3750-advipservicesk9-mz.122-35.SE5
>> >>
>> >> Could be a bug?
>> >>
>> >>
>> >> On Tue, Mar 23, 2010 at 10:20 AM, Mirco Orlandi
>> >> <mirco.orlandi_at_gmail.com>
>> >> wrote:
>> >> > ok Ivan,
>> >> > AS253 is what I supposed.
>> >> >
>> >> > SW2(ospf1+eigrpAS100)--BB1(eigrpAS100+bgpAS253)--BB2(bgpAS254)
>> >> >
>> >> > BB1 redistribute bgpAS253 into eigrpAS100. All bgp routes that BB1
>> >> > learn
>> >> > from BB2 will be tagged 254 during redistribution (Ryan point). Tag
>> >> > swap
>> >> > 254->999 work fine in my lab with route-map I posted (I see tag 999
>> >> > in
>> >> > "show
>> >> > ip ospf database").
>> >> >
>> >> > Cisco IOS Software, 2600 Software (C2691-ADVIPSERVICESK9-M), Version
>> >> > 12.4(15)T8
>> >> > -mirco.
>> >> >
>> >> > On Tue, Mar 23, 2010 at 9:40 AM, Ivan Hrvatska <ivanzghr_at_gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> SW2----------BB1(AS253)-----------BB2 (AS254)
>> >> >>
>> >> >> SW2 -device I have to configure the task on
>> >> >> BB1 - my EIGRP neighbor and BGP router in AS253
>> >> >> BB2 - eBGP peer with BB1
>> >> >>
>> >> >> So, to simulate the task BB2 is in AS253 and has eBGP session with
>> >> >> BB1
>> >> >> so that BB1 can redistribute prefixes into EIGRP which are received
>> >> >> via eBGP session, right?
>> >> >>
>> >> >> Next, when BB1 redistributes those prefixes into EIGRP my SW2
>> >> >> receives
>> >> >> them with route tag 254, which is AS number of originator of those
>> >> >> prefixes, right?
>> >> >>
>> >> >> So, now I should match any tag other than 253 cause I know that my
>> >> >> EIGRP neighbor is in AS 253 and it has to receive prefixes from
>> >> >> another AS for that prefixes to be external, right?
>> >> >> When I issue show ip route 99.99.1.0 and see that route tag is 254,
>> >> >> I
>> >> >> match that tag. But, set tag in the same route map statement doesn't
>> >> >> work. It won't change tag. In OSPF domain I still see those prefixes
>> >> >> with original tag 254.
>> >> >>
>> >> >> When I issue set tag command under redistribution eigrp command
>> >> >> (when
>> >> >> I redistribute from EIGRP into OSPF), tag is changed, but it is
>> >> >> changed for ALL redistributed EIGRP routes, and that is on the goal.
>> >> >>
>> >> >> Regards
>> >> >>
>> >> >> On Mon, Mar 22, 2010 at 5:25 PM, Mirco Orlandi
>> >> >> <mirco.orlandi_at_gmail.com>
>> >> >> wrote:
>> >> >> > Ivan, by your show on SW2 I see you are using "tag 200" inside
>> >> >> > redistribution statement.
>> >> >> > Result should be:
>> >> >> > - change tag to 999 for routes with tag 254
>> >> >> > - set tag 200 to others
>> >> >> >
>> >> >> > It works fine on my lab.
>> >> >> >
>> >> >> > What do you mean by "I know that my EIGRP neighbor is in AS 253"?
>> >> >> > You have ospf 1, eigrp AS100, and a remote bgp peer with AS254. Is
>> >> >> > AS253
>> >> >> > the
>> >> >> > local BGP AS of SW2 eigrp neighbor?
>> >> >> >
>> >> >> > -mirco.
>> >> >> >
>> >> >> > On Mon, Mar 22, 2010 at 4:40 PM, Ivan Hrvatska
>> >> >> > <ivanzghr_at_gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> Well, let's say that my EIGRP neighbor, which is also BGP router,
>> >> >> >> recives some prefixes via eBGP session and redistribute them into
>> >> >> >> EIGRP. My router (SW2) recives that prefixes via EIGRP and EIGRP
>> >> >> >> has
>> >> >> >> originator's AS number as route tag:
>> >> >> >>
>> >> >> >> SW2#sh ip ro 99.99.1.0
>> >> >> >> Routing entry for 99.99.1.0/24
>> >> >> >> Known via "eigrp 100", distance 170, metric 2560000512
>> >> >> >> Tag 254, type external
>> >> >> >> Redistributing via ospf 1, eigrp 100
>> >> >> >> Advertised by ospf 1 subnets tag 200 route-map TAG
>> >> >> >> Last update from 9.9.33.254 on Vlan33, 00:04:02 ago
>> >> >> >> Routing Descriptor Blocks:
>> >> >> >> * 9.9.33.254, from 9.9.33.254, 00:04:02 ago, via Vlan33
>> >> >> >> Route metric is 2560000512, traffic share count is 1
>> >> >> >> Total delay is 20 microseconds, minimum bandwidth is 1 Kbit
>> >> >> >> Reliability 1/255, minimum MTU 1 bytes
>> >> >> >> Loading 1/255, Hops 1
>> >> >> >> Route tag 254
>> >> >> >>
>> >> >> >> If I use that tag 254 in my route-map like this, because I know
>> >> >> >> that
>> >> >> >> my EIGRP neighbor is in AS 253:
>> >> >> >>
>> >> >> >> !
>> >> >> >> route-map TAG permit 10
>> >> >> >> match tag 254
>> >> >> >> set tag 999
>> >> >> >> !
>> >> >> >> route-map TAG permit 90
>> >> >> >> !
>> >> >> >>
>> >> >> >> That prefixes go into OSPF without changed tag ??!! set tag 999
>> >> >> >> didn't
>> >> >> >> change tag. Why?
>> >> >> >> If I put tag command under redistribute command then all prefixes
>> >> >> >> will
>> >> >> >> be tagged with 999.
>> >> >> >> Right?
>> >> >> >>
>> >> >> >> On Mon, Mar 22, 2010 at 3:50 PM, Mirco Orlandi
>> >> >> >> <mirco.orlandi_at_gmail.com>
>> >> >> >> wrote:
>> >> >> >> > Hi Ivan,
>> >> >> >> > using "tag" inside redistribution statement, you are setting
>> >> >> >> > tag
>> >> >> >> > 999
>> >> >> >> > to
>> >> >> >> > all
>> >> >> >> > routes you are redistributing.
>> >> >> >> >
>> >> >> >> > To match the task requirement, you have to set tag 999 only to
>> >> >> >> > external
>> >> >> >> > eigrp routes
>> >> >> >> > On R1:
>> >> >> >> >
>> >> >> >> > route-map set-tag permit 10
>> >> >> >> > match route-type external
>> >> >> >> > set tag 999
>> >> >> >> >
>> >> >> >> > route-map set-tag permit 20
>> >> >> >> >
>> >> >> >> > router ospf 1
>> >> >> >> > redistribute eigrp 1 subnets route-map set-tag
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > but..., if you prefere, you can set tag 999 inside statement
>> >> >> >> > and
>> >> >> >> > override
>> >> >> >> > the tag for non-external routers:
>> >> >> >> >
>> >> >> >> > route-map set-tag permit 10
>> >> >> >> > match route-type external
>> >> >> >> >
>> >> >> >> > route-map set-tag permit 20
>> >> >> >> > set tag 1
>> >> >> >> >
>> >> >> >> > router ospf 1
>> >> >> >> > redistribute eigrp 1 subnets tag 999 route-map set-tag
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > I labbed it with Adv.IP.Svcs 12.4(15)T8
>> >> >> >> > I think first solution is more common, and clear.
>> >> >> >> >
>> >> >> >> > -mirco.
>> >> >> >> >
>> >> >> >> > On Mon, Mar 22, 2010 at 2:33 PM, Ivan Hrvatska
>> >> >> >> > <ivanzghr_at_gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> Tagging eBGP prefixes. Hmm...I see why are you confused. I'm
>> >> >> >> >> also
>> >> >> >> >> confused. Cause when you redistribute BGP into EIGRP those
>> >> >> >> >> prefixes
>> >> >> >> >> are external to EIGRP. After that you redistribute them into
>> >> >> >> >> OSPF.
>> >> >> >> >> During that redistribution they will be tagged using match
>> >> >> >> >> route-type
>> >> >> >> >> external no matter what protocol originates that prefixes...
>> >> >> >> >>
>> >> >> >> >> Well, let's just say that task is "tag all external BGP
>> >> >> >> >> prefixes
>> >> >> >> >> with
>> >> >> >> >> tag 999". ?
>> >> >> >> >>
>> >> >> >> >> On Mon, Mar 22, 2010 at 1:26 PM, Marc La Porte
>> >> >> >> >> <marc.a.laporte_at_gmail.com>
>> >> >> >> >> wrote:
>> >> >> >> >> > Other question: do you mean tagging eBGP prefixes? Or
>> >> >> >> >> > prefixes
>> >> >> >> >> > which
>> >> >> >> >> > were
>> >> >> >> >> > redistributed into BGP?
>> >> >> >> >> >
>> >> >> >> >> > On Mon, Mar 22, 2010 at 13:04, Ivan Hrvatska
>> >> >> >> >> > <ivanzghr_at_gmail.com>
>> >> >> >> >> > wrote:
>> >> >> >> >> >>
>> >> >> >> >> >> How do you tag external BGP prefixes? Let's say you have
>> >> >> >> >> >> two
>> >> >> >> >> >> routers
>> >> >> >> >> >> in EIGRP domain. One router (R2) runs EIGRP and BGP with
>> >> >> >> >> >> some
>> >> >> >> >> >> peers.
>> >> >> >> >> >> Other router runs EIGRP and it is also ASBR OSPF router
>> >> >> >> >> >> (R1).
>> >> >> >> >> >> On
>> >> >> >> >> >> R1
>> >> >> >> >> >> you redistribute EIGRP into OSPF and during redistribution
>> >> >> >> >> >> you
>> >> >> >> >> >> have
>> >> >> >> >> >> to
>> >> >> >> >> >> tag BGP external routes with some tag. Is this enough:
>> >> >> >> >> >>
>> >> >> >> >> >> route-map MAP per 10
>> >> >> >> >> >> match route-type external
>> >> >> >> >> >>
>> >> >> >> >> >> route-map MAP per 100
>> >> >> >> >> >>
>> >> >> >> >> >> router ospf 1
>> >> >> >> >> >> redistribute eigrp 1 subnets tag 999 route-map MAP
>> >> >> >> >> >>
>> >> >> >> >> >> ??
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> 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
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> _______________________________________________________________________
>> >> >> >> >> Subscription information may be found at:
>> >> >> >> >> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Tue Mar 23 2010 - 14:56:17 ART

This archive was generated by hypermail 2.2.0 : Thu Apr 01 2010 - 07:26:35 ART