Mailing List Archive

Aggregate and directly connected routes (route preference)
Hi there,

Is it possible to announce an aggregate route to your eBGP peers that also
happens to be directly connected to an interface on the router?

For example:


aggregate {
route 5.5.5.0/24 {
passive;
}
route 6.6.6.0/24 {
passive;
}
}


fe-0/0/0
unit 0 {
family inet {
address 5.5.5.1/24 {
primary;
preferred;
}
address 6.6.6.1/24;
}
}
}


policy-statement send-AGG {
term send {
from protocol aggregate;
then accept;
}
term reject-rest {
then reject;
}
}


After an initial glance, it would seem that the aggregate route is marked
inactive in the routing table because of the route preference (directly
connected routes take preference over aggregate routes).

Is this merely marked inactive from the point of view of this router, and
when "send-AGG" is exported to an eBGP peer it would be announced as a
aggregate, or am I getting completely the wrong end of the stick here and
need to approach this from a different angle?

I need the aggregate routes to be announced to the eBGP peers. Incoming
traffic (from the outside world) to these prefixes would then be directed
out from the router on the applicable directly attached fe connection. Any
outgoing traffic from the internal network would be directed towards 5.5.5.1
(for example) as a default gateway, and then passed to the outside world
using the routes learned from the eBGP peers.

Thanks in advance,

Robin Balen
Aggregate and directly connected routes (route preference) [ In reply to ]
Why not just advertise the /24 routes via bgp why create an aggregate
when the route already exists?

Do you necessarily need this as an aggregate?

Gary

On Jan 26, 2004, at 5:37 PM, Robin Balen wrote:

> Hi there,
>
> Is it possible to announce an aggregate route to your eBGP peers that
> also
> happens to be directly connected to an interface on the router?
>
> For example:
>
>
> aggregate {
> route 5.5.5.0/24 {
> passive;
> }
> route 6.6.6.0/24 {
> passive;
> }
> }
>
>
> fe-0/0/0
> unit 0 {
> family inet {
> address 5.5.5.1/24 {
> primary;
> preferred;
> }
> address 6.6.6.1/24;
> }
> }
> }
>
>
> policy-statement send-AGG {
> term send {
> from protocol aggregate;
> then accept;
> }
> term reject-rest {
> then reject;
> }
> }
>
>
> After an initial glance, it would seem that the aggregate route is
> marked
> inactive in the routing table because of the route preference (directly
> connected routes take preference over aggregate routes).
>
> Is this merely marked inactive from the point of view of this router,
> and
> when "send-AGG" is exported to an eBGP peer it would be announced as a
> aggregate, or am I getting completely the wrong end of the stick here
> and
> need to approach this from a different angle?
>
> I need the aggregate routes to be announced to the eBGP peers. Incoming
> traffic (from the outside world) to these prefixes would then be
> directed
> out from the router on the applicable directly attached fe connection.
> Any
> outgoing traffic from the internal network would be directed towards
> 5.5.5.1
> (for example) as a default gateway, and then passed to the outside
> world
> using the routes learned from the eBGP peers.
>
> Thanks in advance,
>
> Robin Balen
>
>
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp
>
Aggregate and directly connected routes (route preference) [ In reply to ]
> -----Original Message-----
> From: Gary Tate [mailto:gtate@juniper.net]
> Sent: 27 January 2004 01:49

Gary,

Thanks for the swift reply!

> Why not just advertise the /24 routes via bgp why create an aggregate
> when the route already exists?

This is the source of the advertisement. The equivalent Cisco IOS command
would be:

network 5.5.5.0
network 6.6.6.0

Then set 5.5.5.1 and 6.6.6.1 as addresses on a FE port.

> Do you necessarily need this as an aggregate?

No - this just seemed like a fairly straightforward way of achieving what I
wanted... If you could give any pointers to a more effective method please
let me know!

Regards

Robin Balen
Aggregate and directly connected routes (route preference) [ In reply to ]
The network statement in Cisco does produce aggregate routes if you
have a contributor.

In Juniper the Aggregate route will indeed be inactive. You can simply
advertise the /24 from the interface routes using an appropriate
filter:

policy-options policy statement aggeregate {
????term send-agg-5 {
from route-filter 5.5.5.0/24 exact
then accept;
????????}
????term send-agg-6 {
from route-filter 6.6.6.0/24 exact
then accept;
????????}
term reject-rest {
??????? then reject
}
}

This will advertise only the 5.5.5.0/24 and reject all other routes.
Gary

On Jan 26, 2004, at 5:54 PM, Robin Balen wrote:

>
>
>> -----Original Message-----
>> From: Gary Tate [mailto:gtate@juniper.net]
>> Sent: 27 January 2004 01:49
>
> Gary,
>
> Thanks for the swift reply!
>
>> Why not just advertise the /24 routes via bgp why create an aggregate
>> when the route already exists?
>
> This is the source of the advertisement. The equivalent Cisco IOS
> command
> would be:
>
> network 5.5.5.0
> network 6.6.6.0
>
> Then set 5.5.5.1 and 6.6.6.1 as addresses on a FE port.
>
>> Do you necessarily need this as an aggregate?
>
> No - this just seemed like a fairly straightforward way of achieving
> what I
> wanted... If you could give any pointers to a more effective method
> please
> let me know!
>
> Regards
>
> Robin Balen
>
>
Aggregate and directly connected routes (route preference) [ In reply to ]
You could advertise the aggregate if you really want to by using
advertise-inactive option on the bgp group or neighbor that you wish
the aggregate to be advertised on. This is needed because as you have
mentioned the aggregate will always be inactive in this configuration.

However, if the interfaces which have the actual routes go down the
route will still be advertised and you will sink traffic to your router
before it is dropped.

If you advertise the actual routes then they will be withdrawn if the
interface goes down.

Gary

On Jan 26, 2004, at 6:05 PM, Gary Tate wrote:

> The network statement in Cisco does produce aggregate routes if you
> have a contributor.
>
> In Juniper the Aggregate route will indeed be inactive. You can
> simply advertise the /24 from the interface routes using an
> appropriate filter:
>
> policy-options policy statement aggeregate {
> ????term send-agg-5 {
> from route-filter 5.5.5.0/24 exact
> then accept;
> ????????}
> ????term send-agg-6 {
> from route-filter 6.6.6.0/24 exact
> then accept;
> ????????}
> term reject-rest {
> ??????? then reject
> }
> }
>
> This will advertise only the 5.5.5.0/24 and reject all other routes.
> Gary
>
> On Jan 26, 2004, at 5:54 PM, Robin Balen wrote:
>
>>
>>
>>> -----Original Message-----
>>> From: Gary Tate [mailto:gtate@juniper.net]
>>> Sent: 27 January 2004 01:49
>>
>> Gary,
>>
>> Thanks for the swift reply!
>>
>>> Why not just advertise the /24 routes via bgp why create an aggregate
>>> when the route already exists?
>>
>> This is the source of the advertisement. The equivalent Cisco IOS
>> command
>> would be:
>>
>> network 5.5.5.0
>> network 6.6.6.0
>>
>> Then set 5.5.5.1 and 6.6.6.1 as addresses on a FE port.
>>
>>> Do you necessarily need this as an aggregate?
>>
>> No - this just seemed like a fairly straightforward way of achieving
>> what I
>> wanted... If you could give any pointers to a more effective method
>> please
>> let me know!
>>
>> Regards
>>
>> Robin Balen
>>
>>
>
Aggregate and directly connected routes (route preference) [ In reply to ]
> -----Original Message-----
> From: Gary Tate [mailto:gtate@juniper.net]
> Sent: 27 January 2004 02:05

Gary,

> In Juniper the Aggregate route will indeed be inactive. You
> can simply advertise the /24 from the interface routes using
> an appropriate filter:

Ahah. That makes sense...

I wasn't sure if interface routes were redistributed into eBGP or not under
JunOS, but that does seem to be a much neater way of doing things.

Thanks for your help.

Robin Balen
Aggregate and directly connected routes (route preference) [ In reply to ]
> -----Original Message-----
> From: Gary Tate [mailto:gtate@juniper.net]
> Sent: 27 January 2004 02:18

Gary,

> You could advertise the aggregate if you really want to by using
> advertise-inactive option on the bgp group or neighbor that you wish
> the aggregate to be advertised on. This is needed because as
> you have mentioned the aggregate will always be inactive in this
> configuration.

This sounds good for this specific scenario, as I would like the routes to
be announced independently to the status of the physical interfaces. This is
why I was going to use the aggregate method, even though I'm not actually
aggregating anything.

> However, if the interfaces which have the actual routes go down the
> route will still be advertised and you will sink traffic to
> your router before it is dropped.

That makes sense - thanks!

The advertise-inactive option will choose the "best" route, even if it is
not active. This sounds like what I need. However, would the aggregate
routes be considered the "best" route, or would the interface routes take
priority again? I guess it doesn't actually matter because if the interface
routes are withdrawn due to the interface going down, then the aggregate
routes would step up and be announced instead.

If that's not going to work, just using the interface routes will do the job
just fine.

Thanks for providing a sounding board!

Robin Balen
Aggregate and directly connected routes (route preference) [ In reply to ]
If you use the 'from protocol aggregate' as your match condition and
you use advertise inactive you will only advertise the aggregates and
not the interface routes.

If you use a route filter as the match with advertise inactive then the
interface route will be advertised as the preferred route and then if
it should go down the aggregate will take its place.

Your choice. In your case it sounds like the first choice suites your
needs best.

Gary

On Jan 26, 2004, at 6:30 PM, Robin Balen wrote:

>
>
>> -----Original Message-----
>> From: Gary Tate [mailto:gtate@juniper.net]
>> Sent: 27 January 2004 02:18
>
> Gary,
>
>> You could advertise the aggregate if you really want to by using
>> advertise-inactive option on the bgp group or neighbor that you wish
>> the aggregate to be advertised on. This is needed because as
>> you have mentioned the aggregate will always be inactive in this
>> configuration.
>
> This sounds good for this specific scenario, as I would like the
> routes to
> be announced independently to the status of the physical interfaces.
> This is
> why I was going to use the aggregate method, even though I'm not
> actually
> aggregating anything.
>
>> However, if the interfaces which have the actual routes go down the
>> route will still be advertised and you will sink traffic to
>> your router before it is dropped.
>
> That makes sense - thanks!
>
> The advertise-inactive option will choose the "best" route, even if it
> is
> not active. This sounds like what I need. However, would the aggregate
> routes be considered the "best" route, or would the interface routes
> take
> priority again? I guess it doesn't actually matter because if the
> interface
> routes are withdrawn due to the interface going down, then the
> aggregate
> routes would step up and be announced instead.
>
> If that's not going to work, just using the interface routes will do
> the job
> just fine.
>
> Thanks for providing a sounding board!
>
> Robin Balen
>
>
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp
>
Aggregate and directly connected routes (route preference) [ In reply to ]
robin@gyron.net (Robin Balen) writes:

>
> > You could advertise the aggregate if you really want to by using
> > advertise-inactive option on the bgp group or neighbor that you wish
> > the aggregate to be advertised on. This is needed because as
> > you have mentioned the aggregate will always be inactive in this
> > configuration.
>

advertise-inactive only advertises inactive BGP routes. So it won't
advertise an aggregate if it is inactive.

But you can advertise the interface route when active and the
aggregate when the interface goes down... all you need to do is accept
that prefix indepedently of the originating protocol.

A static discard will less preference will also do the job.

Again, as Gary mentioned, the potential drawback is that you may be
attracting traffic that is going to be droped while there may be an
alternate route in the network, when advertising a discard route.

Pedro.
Aggregate and directly connected routes (route preference) [ In reply to ]
On Jan 26, 2004, at 7:24 PM, Pedro Roque Marques wrote:

> robin@gyron.net (Robin Balen) writes:
>
>>
>>> You could advertise the aggregate if you really want to by using
>>> advertise-inactive option on the bgp group or neighbor that you wish
>>> the aggregate to be advertised on. This is needed because as
>>> you have mentioned the aggregate will always be inactive in this
>>> configuration.
>>
>
> advertise-inactive only advertises inactive BGP routes. So it won't
> advertise an aggregate if it is inactive.
>
Indeed, sorry Robin for any confusion. However, you can still achieve
what you want as stated bellow:

> But you can advertise the interface route when active and the
> aggregate when the interface goes down... all you need to do is accept
> that prefix indepedently of the originating protocol.
>
policy-options policy statement aggeregate {
????term send-agg-5 {
from route-filter 5.5.5.0/24 exact
then accept;
????????}
????term send-agg-6 {
from route-filter 6.6.6.0/24 exact
then accept;
????????}
term reject-rest {
??????? then reject
}
}

this is what we discussed earlier.

> A static discard will less preference will also do the job.
>
> Again, as Gary mentioned, the potential drawback is that you may be
> attracting traffic that is going to be droped while there may be an
> alternate route in the network, when advertising a discard route.
>
> Pedro.
>
Aggregate and directly connected routes (route preference) [ In reply to ]
> -----Original Message-----
> From: Gary Tate [mailto:gtate@juniper.net]
> Sent: 27 January 2004 04:20

Gary, Pedro,

> > advertise-inactive only advertises inactive BGP routes. So it won't
> > advertise an aggregate if it is inactive.

Ah. A fatal flaw in our nice plan ;)

> Indeed, sorry Robin for any confusion. However, you can
> still achieve what you want as stated bellow:

Yeah, we'll just specify the exact prefixes that should be allowed through
the route-filter so those routes can be fulfilled either by the interface
routes, or if they're not present, the aggregate routes.

> Again, as Gary mentioned, the potential drawback is that you may be
> attracting traffic that is going to be droped while there may be an
> alternate route in the network, when advertising a discard route.

Thanks for pointing this out - however in this particular situation this is
what we actually require.

Many thanks for all your help.

Robin Balen