From: Volkov, Dmitry (Toronto - BCE) (dmitry_volkov@ca.ml.com)
Date: Mon Sep 09 2002 - 22:34:06 GMT-3
Guys,
When Omer posted his question - I understood it like:
"How to filter BGP routes (assign different locpref)
coming into particular router basing on next-hop
(BGP next hop, which can be different than closest next-hop),
taken into consideration that You CAN NOT do any changes on neighbors.
It doesn't matter what neighbors are EBGP, IBGP or confed EBGP.
I would consider it as abstract common task
(even if Omer had particular Lab with particular design in mind ;)
I guess there is no way to do it.
Because we could do it using route-map only, but inbound route-map doesn't
allow to do filtering based on next-hop.
It's interesting enough: why does this limitation exist ?
The same time - probably this subj doesn't make sence in real world,
because:
in case of EBGP - all routes from ebgp neighbor will have the same next-hop
-
ip address of neigbor (unless it's multiaccess media);
in case of EBGP confed, since it's confed - we can do filtering (attribute
manipulations) on the other routers in confed (in outbound way) because all
parts of confed run under the same authority and we are not restricted by
rule - "you can't do anything on other routers".
So, I guess there is not necessary to do inbound filtering on next-hop basis
in real world.
Thanks,
Dmitry
> -----Original Message-----
> From: Mingzhou Nie [mailto:mnie@yahoo.com]
> Sent: Monday, September 09, 2002 8:50 PM
> To: Omer Ansari; Carlos G Mendioroz
> Cc: Volkov, Dmitry (Toronto - BCE); 'Omer Ansari'; 'Guoqi Cui';
> 'ccielab@groupstudy.com'
> Subject: Re: bgp: modifying incoming routes based on thei next-hop
>
>
> Omer,
>
> As far as I understand, all three routers are in same AS, right? If
> that's the case, what's the peering relationship among them? Are you
> using full mesh, or RR, or Confed? If they are full mesh, remember, in
> IBGP, all routes learn from one neibghor will not be adv out to other
> IBGP peers, so essentially, what R2 learns from R5 is the routes
> origined from R5. If R2 is the RR, then same idea. RRC will not peer
> with anyone except the RR.
>
> Ming
>
> --- Omer Ansari <omer@ansari.com> wrote:
> > Carlos,
> >
> > as far as the lab goes, R5 and R6 were not ebgp peering so werent
> > receiving any routes from beyond them.
> >
> > there are bgp routes originating from R5 and R6 (via the network
> > statement) these are the suckers we want to change localpref on.
> >
> > see this is exactly the kind of hole i fall into each time.
> > clearly from the lab's perspective,
> >
> > route-map fromR5 permit in
> > set local-preference 50
> > route-map fromR6 permit in
> > set local-preference 200
> >
> > would work, and show ip bgp would look just how u want to see it.
> >
> > however, if there were other routes coming through r5/r6 (remember
> > there's no next-hop-self on them) , then all of them along with the
> > ones originated locally on r5/r6 would be clumped with the above
> > local-preference.
> >
> > so in other words if the proctor is looking at show ip bgp for the
> > answer,
> > u'd get full points, but if he's looking for something funky in the
> > config, then u have lost points.
> >
> > Omer
> >
> >
> > On Mon, 9 Sep 2002, Carlos G Mendioroz
> > wrote:
> >
> > > I may be missing something, but if R5 is connected via point to
> > point,
> > > all networks learnt via R5 should be reachable via it,
> don't they ?
> > >
> > > So what's the difference between "all networks that have
> R5 as next
> > > hop" and "all networks learned via R5" ? I'm assuming eBGP too.
> > >
> > > "Volkov, Dmitry (Toronto - BCE)" wrote:
> > > >
> > > > Hello again,
> > > >
> > > > I'm sorry - I was wrong ;) - it's changing LocPref for
> all routes
> > (doesn't
> > > > matter what next-hop), so it doesn't work really...
> > > >
> > > > Interesting, I don't see any way how to do it.
> > > >
> > > > Dmitry
> > > >
> > > > > -----Original Message-----
> > > > > From: Volkov, Dmitry (Toronto - BCE)
> > > > > Sent: Sunday, September 08, 2002 2:39 PM
> > > > > To: 'Omer Ansari'; Guoqi Cui
> > > > > Cc: ccielab@groupstudy.com
> > > > > Subject: RE: bgp: modifying incoming routes based on thei
> > next-hop
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > Just tested it. It doesn't like it, but... it works :)
> > > > > IOS 12.1(16) Ent +
> > > > >
> > > > > router bgp XX
> > > > > neighbor 1.2.3.7 route-map COMM in
> > > > >
> > > > >
> > > > > r2(config-route-map)#set local-preference 4242
> > > > > % "COMM" used as BGP inbound route-map, nexthop match not
> > supported
> > > > > r2(config-route-map)#^Z
> > > > >
> > > > > route-map COMM permit 5
> > > > > match ip next-hop 3
> > > > > set local-preference 4242
> > > > >
> > > > > access-list 3 permit 1.2.3.7
> > > > >
> > > > >
> > > > > Network Next Hop Metric LocPrf
> Weight Path
> > > > > s> 192.168.1.0 1.2.3.7 0 4242 0 10 i
> > > > > s> 192.168.2.0 1.2.3.7 0 4242 0 10 i
> > > > > *> 192.168.3.0 1.2.3.7 0 4242 0 10 i
> > > > > s> 192.168.4.0 1.2.3.7 0 4242 0 10 i
> > > > > r2#
> > > > >
> > > > >
> > > > > Dmitry
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Omer Ansari [mailto:omer@ansari.com]
> > > > > > Sent: Sunday, September 08, 2002 9:56 AM
> > > > > > To: Guoqi Cui
> > > > > > Cc: ccielab@groupstudy.com
> > > > > > Subject: Re: bgp: modifying incoming routes based on thei
> > next-hop
> > > > > >
> > > > > >
> > > > > > And what about the routes learnt through but not originated
> > > > > from R5(or
> > > > > > R6)?
> > > > > >
> > > > > > Also, I'm not allowed to make any modifications on R5 or R6.
> > > > > >
> > > > > >
> > > > > > On Sun, 8 Sep 2002, Guoqi Cui wrote:
> > > > > >
> > > > > > > In your case, you do not need use match in the
> > > > > > > route-map. Just put the desired local preference is
> > > > > > > fine.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --- Omer Ansari <omer@ansari.com> wrote:
> > > > > > > > All,
> > > > > > > >
> > > > > > > > {cloud}---R5------R2------R6----{anothercloud}
> > > > > > > >
> > > > > > > > R2 is actually the hub router, and is connected to
> > > > > > > > other routers, not
> > > > > > > > shown here for sake of simplicity.
> > > > > > > >
> > > > > > > > the requirement is to modify R2, so that the
> > > > > > > > localpref is changed to 50
> > > > > > > > for routes coming in with next hop of R5, and 250
> > > > > > > > for routes with next hop
> > > > > > > > of R6.
> > > > > > > >
> > > > > > > > currently:
> > > > > > > > R2#sib
> > > > > > > >
> > > > > > > > Network Next Hop Metric
> > > > > > > > LocPrf Weight Path
> > > > > > > > *>i155.55.55.0/24 100.20.3.5 0
> > > > > > > > 100 0 i
> > > > > > > > *>i166.66.66.0/24 100.20.3.6 0
> > > > > > > > 100 0 i
> > > > > > > > ....
> > > > > > > >
> > > > > > > > bgp_snip>
> > > > > > > > on R2:
> > > > > > > > ....
> > > > > > > > neighbor 100.20.3.5 route-map local_pref in
> > > > > > > > neighbor 100.20.3.6 route-map local_pref in
> > > > > > > >
> > > > > > > > problem is:
> > > > > > > >
> > > > > > > > R2(config)#route-m local_pref
> > > > > > > > R2(config-route-map)#match ip next-hop 5
> > > > > > > > % "local_pref" used as BGP inbound route-map,
> > > > > > > > nexthop match not supported
> > > > > > > > % "local_pref" used as BGP inbound route-map,
> > > > > > > > nexthop match not supported
> > > > > > > > R2(config-route-map)#
> > > > > > > >
> > > > > > > >
> > > > > > > > R2#sh ver | inc file
> > > > > > > > System image file is "flash:c2600-js-mz.121-15"
> > > > > > > >
> > > > > > > >
> > > > > > > > any ideas?
> > > > > > > > Omer
> > > > > > > >
> > > > > > >
> > __________________________________________________________________
> > > > > > > > To unsubscribe from the CCIELAB list, send a message
> > > > > > > > to
> > > > > > > > majordomo@groupstudy.com with the body containing:
> > > > > > > > unsubscribe ccielab
> > > > > > >
> > > > > > >
> > > > > > > __________________________________________________
> > > > > > > Do You Yahoo!?
> > > > > > > Yahoo! Finance - Get real-time stock quotes
> > > > > > > http://finance.yahoo.com
> > > --
> > > Carlos G Mendioroz <tron@huapi.ba.ar> LW7 EQI Argentina
> __________________________________________________
> Yahoo! - We Remember
> 9-11: A tribute to the more than 3,000 lives lost
> http://dir.remember.yahoo.com/tribute
This archive was generated by hypermail 2.1.4 : Mon Oct 07 2002 - 07:43:47 GMT-3