Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > BGP conditional advertisement

Reply
Thread Tools

BGP conditional advertisement

 
 
Ivan Ostres
Guest
Posts: n/a
 
      08-02-2004
Hi all,

in
http://www.cisco.com/en/US/tech/tk36...nfiguration_ex
ample09186a0080094309.shtml is described how to make BGP to advertise
some prefix if some other route is NOT present in local routing table.

I need to do a opposite thing: I need to be able to adverise prefix if,
and only if specified route IS in local routing table.

Is this possible, and if it is, how?


--
-Ivan.

*** Use Rot13 to see my eMail address ***
 
Reply With Quote
 
 
 
 
Terry Baranski
Guest
Posts: n/a
 
      08-03-2004
On Mon, 2 Aug 2004 12:02:24 +0200, Ivan Ostres
<(E-Mail Removed)> wrote:
>
>in
>http://www.cisco.com/en/US/tech/tk36...nfiguration_ex
>ample09186a0080094309.shtml is described how to make BGP to advertise
>some prefix if some other route is NOT present in local routing table.
>
>I need to do a opposite thing: I need to be able to adverise prefix if,
>and only if specified route IS in local routing table.
>
>Is this possible, and if it is, how?


I don't know of a clean way to do it offhand, but depending on your
situation you may be able to accomplish this in an ugly fashion by
getting clever with some bleeding-edge IOS features. I haven't
thought about this in depth, so there may be a flaw or two in my
reasoning, but bare with me here:

Route tracking is possible as of 12.2(15)T:
http://www.cisco.com/en/US/products/...html#wp1045974

Static routes can activate and deactivate themselves based on tracked
objects as of 12.3(T:
http://www.cisco.com/en/US/products/...html#wp1075804

With these two features you may be able to do the following:

1) Configure a tracking object to track the reachability of the route
that you want to ensure is in the routing table (route A) prior to
advertising "the other route" (route B).

2) Configure a static route for route B. Have this static route track
the tracking object from step 1 so that it is only active when route A
is in the routing table.

3) BGP only advertises prefixes that exist in the routing table. The
removal of route A from the routing table will result in the removal
of route B; hence, BGP will stop advertising route B. The net result
is that route B is only advertised when route A is in the routing
table.

If this even works at all, it'll break down in some situations such as
if route B is learned via a routing protocol. In this case, route B
will likely continue to be learned dynamically regardless of route A's
status, which will prevent the above from working.

But it's food for thought, perhaps.

-Terry
 
Reply With Quote
 
 
 
 
John Agosta
Guest
Posts: n/a
 
      08-03-2004

"Terry Baranski" <(E-Mail Removed)0VE.com> wrote in message
news:(E-Mail Removed)...
> On Mon, 2 Aug 2004 12:02:24 +0200, Ivan Ostres
> <(E-Mail Removed)> wrote:
> >
> >in
> >http://www.cisco.com/en/US/tech/tk36...nfiguration_ex
> >ample09186a0080094309.shtml is described how to make BGP to advertise
> >some prefix if some other route is NOT present in local routing table.
> >
> >I need to do a opposite thing: I need to be able to adverise prefix if,
> >and only if specified route IS in local routing table.
> >
> >Is this possible, and if it is, how?

>
> I don't know of a clean way to do it offhand, but depending on your
> situation you may be able to accomplish this in an ugly fashion by
> getting clever with some bleeding-edge IOS features. I haven't
> thought about this in depth, so there may be a flaw or two in my
> reasoning, but bare with me here:
>
> Route tracking is possible as of 12.2(15)T:
>

http://www.cisco.com/en/US/products/...html#wp1045974
>
> Static routes can activate and deactivate themselves based on tracked
> objects as of 12.3(T:
>

http://www.cisco.com/en/US/products/...html#wp1075804
>
> With these two features you may be able to do the following:
>
> 1) Configure a tracking object to track the reachability of the route
> that you want to ensure is in the routing table (route A) prior to
> advertising "the other route" (route B).
>
> 2) Configure a static route for route B. Have this static route track
> the tracking object from step 1 so that it is only active when route A
> is in the routing table.
>
> 3) BGP only advertises prefixes that exist in the routing table. The
> removal of route A from the routing table will result in the removal
> of route B; hence, BGP will stop advertising route B. The net result
> is that route B is only advertised when route A is in the routing
> table.
>
> If this even works at all, it'll break down in some situations such as
> if route B is learned via a routing protocol. In this case, route B
> will likely continue to be learned dynamically regardless of route A's
> status, which will prevent the above from working.
>
> But it's food for thought, perhaps.
>
> -Terry



Wouldn't a simple "network x.x.x.x mask y.y.y.y" statement do the trick ?




 
Reply With Quote
 
Terry Baranski
Guest
Posts: n/a
 
      08-04-2004
On Tue, 3 Aug 2004 18:48:40 -0500, "John Agosta"
<j_agosta@remove_wideopenwest.kom> wrote:
>
>Wouldn't a simple "network x.x.x.x mask y.y.y.y" statement do the trick ?


I don't believe so, unless I'm misunderstanding something. The above
command will announce route x.x.x.x if and only if route x.x.x.x
exists in the routing table. Ivan's issue is how to announce route
x.x.x.x if and only if route z.z.z.z exists in the routing table.

-Terry
 
Reply With Quote
 
John Agosta
Guest
Posts: n/a
 
      08-04-2004

"Terry Baranski" <(E-Mail Removed)0VE.com> wrote in message
news:(E-Mail Removed)...
> On Tue, 3 Aug 2004 18:48:40 -0500, "John Agosta"
> <j_agosta@remove_wideopenwest.kom> wrote:
> >
> >Wouldn't a simple "network x.x.x.x mask y.y.y.y" statement do the trick ?

>
> I don't believe so, unless I'm misunderstanding something. The above
> command will announce route x.x.x.x if and only if route x.x.x.x
> exists in the routing table.



The link Ivan supplied doesn't work for me, so I can't put the question into
context.
However.......

You interpret the above command the same as I do.
This is how I read his question:

>
>"I need to do a opposite thing: I need to be able to adverise prefix if,
>and only if specified route IS in local routing table."
>



>Ivan's issue is how to announce route
> x.x.x.x if and only if route z.z.z.z exists in the routing table.
>
> -Terry




But if your understanding (above) is indeed the problem, I wonder if:

Look at the next hop address associate with z.z.z.z when it IS in the
routing table.
Then,
ip route x.x.x.x {mask} [next_hop_for_z.z.z.z] null 0

Thinking is, the static route for x.x.x.x will only be valid/appear in the
IGP table if the z.z.z.z Next_hop is available.

Then, use the "network" command and mask for x.x.x.x for BGP advertisement ?

Is this whacky? I need to try it.....
(so much fun....)


Please post the URL for 'tracked objects' again.
It sounds like a plan, but I can't seem to make them 'click,' either....



Ok - be well, fellas !


-ja





 
Reply With Quote
 
Ivan Ostres
Guest
Posts: n/a
 
      08-04-2004
In article <(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed)0VE.com says...
> On Tue, 3 Aug 2004 18:48:40 -0500, "John Agosta"
> <j_agosta@remove_wideopenwest.kom> wrote:
> >
> >Wouldn't a simple "network x.x.x.x mask y.y.y.y" statement do the trick ?

>
> I don't believe so, unless I'm misunderstanding something. The above
> command will announce route x.x.x.x if and only if route x.x.x.x
> exists in the routing table. Ivan's issue is how to announce route
> x.x.x.x if and only if route z.z.z.z exists in the routing table.
>
> -Terry
>


Thanx Terry and John,

This is exactly what I was looking for (what Terry wrote). I've
implemented in a lab using SAA, but I was looking if there was a cleaner
way to solve the problem. Since nobody answered something different,
seems that there's no such option.

The reason why I was looking another way to do it because there's a
older (12.1) IOS on routers and customer don't want to change that
(flash, dram issue) unless it is absolute necessary.

Thanx again T and J for confirming my solution as the only possible.

--
-Ivan.

*** Use Rot13 to see my eMail address ***
 
Reply With Quote
 
Terry Baranski
Guest
Posts: n/a
 
      08-04-2004
Here are some shorter links:

http://tinyurl.com/5rw88
http://tinyurl.com/6gsdh

More below...

On Tue, 3 Aug 2004 22:07:41 -0500, "John Agosta"
<j_agosta@remove_wideopenwest.kom> wrote:
>
>But if your understanding (above) is indeed the problem, I wonder if:
>
>Look at the next hop address associate with z.z.z.z when it IS in the
>routing table.
>Then,
>ip route x.x.x.x {mask} [next_hop_for_z.z.z.z] null 0
>
>Thinking is, the static route for x.x.x.x will only be valid/appear in the
>IGP table if the z.z.z.z Next_hop is available.
>
>Then, use the "network" command and mask for x.x.x.x for BGP advertisement ?
>
>Is this whacky? I need to try it.....
>(so much fun....)


The problem with the above is that the next-hop for z.z.z.z may be
reachable even when z.z.z.z isn't, particularly if z.z.z.z is a remote
network.

But I think you may have hit upon something here. There may be a
recursive routing-based solution to this that's easier than this route
tracking madness. If you define the static route for x.x.x.x as
follows:

ip route x.x.x.x {mask} z.z.z.z

This should result in traffic destined to x.x.x.x being forwarded to
z.z.z.z's next-hop when z.z.z.z is in the routing table. When z.z.z.z
isn't in the routing table, the route to x.x.x.x should disappear.
(This is true even if there's a default route in the routing table due
to the way Cisco does recursive routing.)

It's so simple that I can't help but wonder what I'm missing...

-Terry
 
Reply With Quote
 
Hansang Bae
Guest
Posts: n/a
 
      08-05-2004
> (E-Mail Removed)0VE.com says...
> > I don't believe so, unless I'm misunderstanding something. The above
> > command will announce route x.x.x.x if and only if route x.x.x.x
> > exists in the routing table. Ivan's issue is how to announce route
> > x.x.x.x if and only if route z.z.z.z exists in the routing table.



In article <(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> This is exactly what I was looking for (what Terry wrote). I've
> implemented in a lab using SAA, but I was looking if there was a cleaner
> way to solve the problem. Since nobody answered something different,
> seems that there's no such option.
>
> The reason why I was looking another way to do it because there's a
> older (12.1) IOS on routers and customer don't want to change that
> (flash, dram issue) unless it is absolute necessary.



How about something like this:

router bgp BLAH
neighbor blah blah route-map SEND_ONLY_IF_NET-Z_EXISTS
network blah mask blah
!

access-list 1 permit z.z.z.z
access-list 2 permit the_correct_next_hop_IP_here

route-map SEND_ONLY_IF_NET-Z_EXISTS permit 10
match ip address 1
match ip next-hop 2

Off the top of my head, I think this will work.

--

hsb

"Somehow I imagined this experience would be more rewarding" Calvin
*************** USE ROT13 TO SEE MY EMAIL ADDRESS ****************
************************************************** ******************
Due to the volume of email that I receive, I may not not be able to
reply to emails sent to my account. Please post a followup instead.
************************************************** ******************
 
Reply With Quote
 
Ivan Ostres
Guest
Posts: n/a
 
      08-09-2004
In article <(E-Mail Removed)>,
(E-Mail Removed) says...
> > (E-Mail Removed)0VE.com says...
> > > I don't believe so, unless I'm misunderstanding something. The above
> > > command will announce route x.x.x.x if and only if route x.x.x.x
> > > exists in the routing table. Ivan's issue is how to announce route
> > > x.x.x.x if and only if route z.z.z.z exists in the routing table.

>
>
> In article <(E-Mail Removed)>,
> (E-Mail Removed) says...
> > This is exactly what I was looking for (what Terry wrote). I've
> > implemented in a lab using SAA, but I was looking if there was a cleaner
> > way to solve the problem. Since nobody answered something different,
> > seems that there's no such option.
> >
> > The reason why I was looking another way to do it because there's a
> > older (12.1) IOS on routers and customer don't want to change that
> > (flash, dram issue) unless it is absolute necessary.

>
>
> How about something like this:
>
> router bgp BLAH
> neighbor blah blah route-map SEND_ONLY_IF_NET-Z_EXISTS
> network blah mask blah
> !
>
> access-list 1 permit z.z.z.z
> access-list 2 permit the_correct_next_hop_IP_here
>
> route-map SEND_ONLY_IF_NET-Z_EXISTS permit 10
> match ip address 1
> match ip next-hop 2
>
> Off the top of my head, I think this will work.
>
>


Thanks Hansang, I'll test it in a lab today and see if that is what I
really want. (I've done the similar thing before, just without
the_correct_next_hop_IP_here and it didn't worked as it should).

And thanks to John and Terry for their ideas and solutions.


--
-Ivan.

*** Use Rot13 to see my eMail address ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BGP Conditional advertisement with Community attributes qamar General Computer Support 0 09-15-2009 05:49 AM
Adding a BGP advertisement essenz Cisco 3 01-31-2008 04:57 PM
BGP: Verify Community Advertisement amyl@paxemail.com Cisco 0 06-17-2005 06:41 AM
Hunting a BGP advertisement leak ... Garry Cisco 6 03-21-2005 01:01 PM
Difference between "bgp dampening" and "bgp bestpath dampening" harald rüger Cisco 0 10-25-2004 04:07 PM



Advertisments