From: Ken.Farrington@barclayscapital.com
Date: Mon Sep 29 2003 - 03:28:27 GMT-3
It looks like here it has gone on to the second route-map statement or am I
missing something fundamental
-----Original Message-----
From: Arifur Rahman [mailto:arahman@cisco.com]
Sent: 29 September 2003 05:02
To: Ken.Farrington@barclayscapital.com
Cc: jhays@jtan.com; info@mpauli.de; Ken.Farrington@barclayscapital.com;
ccielab@groupstudy.com
Subject: RE: Re-4: Route-Map Logic (Example from networkers 2000)
Hi
I see expected result. If it match first route-map it did not go to 2nd
route map statement.
router bgp 200
neighbor 150.50.5.68 remote-as 100
neighbor 150.50.5.68 route-map assign in
!
ip as-path access-list 1 permit _50_
ip as-path access-list 2 permit _75_
!
route-map assign permit 10
match as-path 1
set metric 111
!
route-map assign permit 20
match as-path 2
set local-preference 222
Network Next Hop Metric LocPrf Weight Path
*> 130.10.10.0/24 150.50.5.68 111 0 100 50 i
*> 130.20.20.0/24 150.50.5.68 111 0 100 50 i
*> 140.10.10.0/24 150.50.5.68 0 222 0 100 75 i
*> 140.20.20.0/24 150.50.5.68 0 222 0 100 75 i
*> 160.10.10.0/24 150.50.5.68 111 0 100 50 75 i
*> 160.20.20.0/24 150.50.5.68 111 0 100 50 75 i
At 07:15 PM 9/28/2003 +0100, Ken.Farrington@barclayscapital.com wrote:
>Hi Guys,
>
>I am getting a little more confuse now and I hope this e-mail makes
>sense to all, im off for a cigerette and when I come back, this e-mail
>probably wont make sense to me :))
>
>
>
>if I have
>
>ip as-path access-list 2 permit ^$
>!
>route-map test permit 10
> match as-path 2
> set metric 333
>!
>route-map test permit 20
> match as-path 2
> set metric 444
>!
>
>It sets the metric on the neighboring BGP router to 333 only for
>prefixes that match the as-path criteria. It does not go onto the next
>stage of the route map or if it does, it does not set the metric. This
>is inline which what the networkers thing says.
>
>
>Now if I have this
>
>ip as-path access-list 2 permit ^$
>ip as-path access-list 3 permit ^300
>!
>route-map test permit 10
> match as-path 2
> set metric 333
>!
>route-map test permit 20
> match as-path 3
> set metric 444
>!
>
>It sets the metric to 333 on wotever matches criteria in as-path list 2
>and then goes on to set the metric to 444 for any criteria that meets
>as-path list 3.
>
>So can I assume, a prefix can only be matched once in a bgp table (or
>routing table) and then exits or goes on the the next line of the
>route-map? Which then the particular prefix that has already been
>matched against once cannot be matched against again?
>
>Also, if it does go on to the next stage of the route-map, how does it
>know not to match again against a ;prefix that has already been
>matched?
>
>Concept I cant get to grasps with here?
>
>Many thx
>
>Confused Kennyboy
>
>-----Original Message-----
>From: Jonathan V Hays [mailto:jhays@jtan.com]
>Sent: 28 September 2003 15:49
>To: info@mpauli.de; Ken.Farrington@barclayscapital.com
>Cc: ccielab@groupstudy.com
>Subject: RE: Re-4: Route-Map Logic (Example from networkers 2000)
>
>
>I was a bit surprised at the results, but I am glad for the knowledge
>gained.
>
>Thanks! Good information to know.
>
>Jonathan
>
>-----Original Message-----
>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
>info@mpauli.de
>Sent: Sunday, September 28, 2003 10:20 AM
>To: jhays@jtan.com; Ken.Farrington@barclayscapital.com
>Cc: ccielab@groupstudy.com
>Subject: Re-4: Route-Map Logic (Example from networkers 2000)
>
>
>Hi Jonathan,
>
>you're right concerning the def. weight. But if the default is in
>effect, it is not displayed with sh ip bgp. The point was, to
>demonstrate, that after a permit in a route-map, it is checked against
>the other entrys. (Your point 2).
>
>Anyway, I've just changed the route-map:
>
>R2#sh ip bgp
>BGP table version is 20, local router ID is 133.1.2.2
>Status codes: s suppressed, d damped, h history, * valid, > best, i -
>internal Origin codes: i - IGP, e - EGP, ? - incomplete
>
> Network Next Hop Metric LocPrf Weight Path
>*>i1.1.1.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i2.2.2.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i3.3.3.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i4.4.4.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i5.5.5.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i6.6.6.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i10.10.1.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i133.1.253.0/24 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i144.10.13.0/24 133.1.3.3 444 100 0 5001 i
>* i144.10.31.0/24 133.1.3.3 444 100 0 5001 i
> Network Next Hop Metric LocPrf Weight Path
>* i144.10.35.0/24 133.1.3.3 444 100 0 5001 i
>*>i144.10.111.0/24 133.1.3.3 444 100 0 5001 i
>*>i150.100.1.0/24 133.1.3.3 444 100 0 5001 i
>*>i192.168.161.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i192.168.167.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i192.168.170.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i197.65.7.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i198.199.199.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i199.199.198.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i199.199.199.0 133.1.3.3 300 100 0 5001 65001
>253 99 100 i
>*>i201.201.201.0 133.1.3.3 444 100 0 5001 i
>
>Q.E.D. ;-)
>
>Cheers
>Marcus
>
>
>-------- Original Message --------
>Subject: RE: Re-2: Route-Map Logic (Example from networkers 2000)
>(28-Sep-2003 16:12)
>From: jhays@jtan.com
>To: info@mpauli.de
>
> > I see some flaws in this test.
> >
> > 1. You are setting local preference to the default, which is 100. So
>it
> > is not easy to tell if the route-map has actually done anything. You
> > would do better to use a non-default value, such as 111.
> >
> > 2. Please note that each route is filtered by the route-map
> > individually. If there are 10 routes, then the route-map is executed
>10
> > times. So one route might match on permit 10 while the next route
> > matches on permit 20.
> >
> > To verify that the route-map is exiting on the first match for a
> > given route, a better test might be this:
> >
> > route-map bla01 permit 10
> > match as-path 10
> > set metric 300
> > !
> > route-map bla01 permit 20
> > match as-path 10
> > set metric 444
> >
> > If the route-map does NOT exit after permit 10 has set the metric to
> > 300, then the final metric will be 444.
> >
> > HTH,
> >
> > Jonathan
> >
> > -----Original Message-----
> > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
>Of
> > info@mpauli.de
> > Sent: Sunday, September 28, 2003 8:40 AM
> > To: Ken.Farrington@barclayscapital.com
> > Cc: ccielab@groupstudy.com
> > Subject: Re-2: Route-Map Logic (Example from networkers 2000)
> >
> >
> > Hi Ken,
> >
> > I've just tested it myself:
> > Originating router:
> >
> > router bgp 1
> > bgp router-id 133.1.5.5
> > bgp log-neighbor-changes
> > neighbor 133.1.2.2 remote-as 1
> > neighbor 133.1.2.2 update-source Loopback0
> > neighbor 133.1.2.2 route-reflector-client
> > neighbor 133.1.2.2 route-map bla01 out
> > neighbor 133.1.3.3 remote-as 5001
> > neighbor 133.1.3.3 ebgp-multihop 2
> > neighbor 133.1.3.3 update-source Loopback0
> > neighbor 133.1.6.6 remote-as 1
> > neighbor 133.1.6.6 update-source Loopback0
> > neighbor 133.1.6.6 route-reflector-client
> > !
> > ip as-path access-list 10 permit 99
> > ip as-path access-list 20 permit ^5001
> > !
> > !
> > route-map bla01 permit 10
> > match as-path 10
> > set metric 300
> > !
> > route-map bla01 permit 20
> > match as-path 20
> > set local-preference 100
> >
> > The outcome on the destination router looks like this:
> >
> > R2#sh ip bgp
> > BGP table version is 21, local router ID is 133.1.2.2 Status codes:
> > s suppressed, d damped, h history, * valid, > best, i - internal
> > Origin codes: i - IGP, e - EGP, ? - incomplete
> >
> > Network Next Hop Metric LocPrf Weight Path
> > *>i1.1.1.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i2.2.2.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i3.3.3.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i4.4.4.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i5.5.5.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i6.6.6.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i10.10.1.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i133.1.253.0/24 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i144.10.13.0/24 133.1.3.3 100 0 5001 i
> > * i144.10.31.0/24 133.1.3.3 100 0 5001 i
> > Network Next Hop Metric LocPrf Weight Path
> > *>i144.10.35.0/24 133.1.3.3 100 0 5001 i
> > *>i144.10.111.0/24 133.1.3.3 100 0 5001 i
> > *>i150.100.1.0/24 133.1.3.3 100 0 5001 i
> > *>i192.168.161.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i192.168.167.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i192.168.170.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i197.65.7.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i198.199.199.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i199.199.198.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i199.199.199.0 133.1.3.3 300 100 0 5001
>65001
> > 253 99 100 i
> > *>i201.201.201.0 133.1.3.3 100 0 5001 i
> >
> > Thus, the process was running through both route-maps. As per your
> > statement, it should only be the MED of 300 for all prefixes
>containing
> > AS 99...
> >
> > Hope I could help.
> >
> > Cheers
> > Marcus
> >
> >
> > -------- Original Message --------
> > Subject: RE: Route-Map Logic (Example from networkers 2000)
>(28-Sep-2003
> > 14:12)
> > From: Ken.Farrington@barclayscapital.com
> > To: navaid@rogers.com
> >
> > > Yes, they are for different routes.
> > >
> > > I am just confused then, on how the route-maps work, so, if you
> > > set
> > an
> > > attrib on prefix A, lets say, then you cant do anything else with
> > > a
> > route
> > > map to that prefix?
> > >
> > > ? Im sure there are some "route-map Kings" on this list
> > > somewhere?
>
> > >
> > > Many thx for the input Navaid :)
> > >
> > >
> > > -----Original Message-----
> > > From: navaid@rogers.com [mailto:navaid@rogers.com]
> > > Sent: 28 September 2003 12:55
> > > To: Ken.Farrington@barclayscapital.com; ccielab@groupstudy.com
> > > Cc: kenfarrington@yahoo.com
> > > Subject: Re: Route-Map Logic (Example from networkers 2000)
> > >
> > >
> > > Ken,
> > > Are you setting community attribute and next-hop for same route.
> > > If it is for different routes. I think it will work because
>route-map
> > is
> > > applied for each route one by one.
> > >
> > > Navaid.
> > >
> > >
> > > >
> > > > From: Ken.Farrington@barclayscapital.com
> > > > Date: 2003/09/28 Sun AM 06:54:05 EDT
> > > > To: ccielab@groupstudy.com
> > > > CC: kenfarrington@yahoo.com
> > > > Subject: Route-Map Logic (Example from networkers 2000)
> > > >
> > > > All,
> > > >
> > > > I am a little confused about the route-map logic that Cisco use.
> > > > In their example from networkers 2000, they say (note the first
>line
> > in
> > > the
> > > > table)
> > > > that if in your route-map, you have a hit on a permit and set an
> > > attribute,
> > > > the
> > > > route-map will exit?
> > > >
> > > > +--------------------------------------------------------------+
> > > > | ROUTE-MAP | MATCH CLAUSE/ | ACCEPT ROUTE and | EXIT |
> > > > | STANZA | PREFIX-LIST | SET ATTRIBUTE | ROUTE-MAP |
> > > > +-----------+-----------------+--------------------+-----------+
> > > > | Permit | Yes/Permit | Yes | Yes |
> > > > | | | | |
> > > > | Permit | No/Deny | No | No |
> > > > | | | | |
> > > > | Deny | Yes/Permit | No | Yes |
> > > > | | | | |
> > > > | Deny | No/Deny | No | No |
> > > > +-----------+-----------------+--------------------+-----------+
> > > >
> > > >
> > > >
> > > > So I have a route map doing two things for BGP.
> > > > 1. Setting the next-hop attrib
> > > > 2. Setting the community
> > > >
> > > > But my route map does not exit after the first hit (permit 10)
> > > > to
> > set the
> > > > next hop.
> > > > It does continue to go onto 20 and set my community.
> > > >
> > > > Can someone please clarify this for me.
> > > >
> > > > ****Will it always go onto the next route-map statment if there
> > > > is
> > one?
> > > ****
> > > >
> > > >
> > > >
> > > > !
> > > > ip prefix-list BGP-COMM-LIST seq 5 permit 1.1.1.0/24
> > > > ip prefix-list BGP-COMM-LIST seq 10 permit 2.2.2.0/24
> > > > !
> > > > ip prefix-list BGP-SNH-LIST seq 5 permit 3.3.3.3/32
> > > > ip prefix-list BGP-SNH-LIST seq 10 permit 4.4.4.4/32
> > > > !
> > > > !
> > > > route-map BGP-ATTRIB permit 10
> > > > match ip address prefix-list BGP-SNH-LIST
> > > > set ip next-hop 142.220.10.1
> > > > !
> > > > route-map BGP-ATTRIB permit 20
> > > > match ip address prefix-list BGP-COMM-LIST
> > > > set community local-AS
> > > > !
> > > > route-map BGP-ATTRIB permit 30
> > > > !
> > > >
> > > >
> > > >
> > > >
> >
>-----------------------------------------------------------------------
>-
> > > > For more information about Barclays Capital, please visit our
> > > > web site at http://www.barcap.com.
> > > >
> > > >
> > > > Internet communications are not secure and therefore the
> > > > Barclays Group does not accept legal responsibility for the
> > > > contents of
>this
> > > > message. Although the Barclays Group operates anti-virus
> > programmes,
> > > > it does not accept responsibility for any damage whatsoever that
>is
> > > > caused by viruses being passed. Any views or opinions presented
>are
> >
> > > > solely those of the author and do not necessarily represent
> > > > those
>of
> > the
> > > > Barclays Group. Replies to this email may be monitored by the
> > Barclays
> > > > Group for operational or business reasons.
> > > >
> > > >
> >
>-----------------------------------------------------------------------
>-
> > > >
> > > > ***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
> > > >
> >
>_______________________________________________________________________
> > > > Please help support GroupStudy by purchasing your study
> > > > materials
> > from:
> > > > shop.groupstudy.com
> > > >
> > > > Subscription information may be found at:
> > > > http://www.groupstudy.com/list/CCIELab.html
> > > >
> > >
> > > 1
> > >
> > > ***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
> > >
> >
>_______________________________________________________________________
> > > Please help support GroupStudy by purchasing your study materials
> > from:
> > > shop.groupstudy.com
> > >
> > > Subscription information may be found at:
> > > http://www.groupstudy.com/list/CCIELab.html
> >
> >
> > To: Ken.Farrington@barclayscapital.com
> > Cc: ccielab@groupstudy.com
> >
> > ***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
> >
>_______________________________________________________________________
> > Please help support GroupStudy by purchasing your study materials
>from:
> > shop.groupstudy.com
> >
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
> >
> > ***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
> >
>_______________________________________________________________________
> > Please help support GroupStudy by purchasing your study materials
>from:
> > shop.groupstudy.com
> >
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
>
>To: jhays@jtan.com
> Ken.Farrington@barclayscapital.com
>Cc: ccielab@groupstudy.com
>
>***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
>_______________________________________________________________________
>Please help support GroupStudy by purchasing your study materials from:
>shop.groupstudy.com
>
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
>
>***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
>_______________________________________________________________________
>Please help support GroupStudy by purchasing your study materials from:
>shop.groupstudy.com
>
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
***Get your CCIE and a FREE vacation: Shop.GroupStudy.com***
This archive was generated by hypermail 2.1.4 : Wed Oct 01 2003 - 07:24:39 GMT-3