On 2018-04-20 14:46, Kapetanakis Giannis wrote:
On 04/02/18 01:42, Remi Locherer wrote:
Hi

This adds a new feature to ospfd: depend on interface.

A ospfd.conf using it looks like this:

--%<--
redistribute default depend on carp0
area 0.0.0.0 {
        interface em2 { depend on carp0 }
        [...]
}
--%<--

This router would send out the default route and the em2 network with
default metrics as long as carp0 is master. When carp0 becomes backup these
routes are advertised with metric 65535.

"depend on" can also be used with other interface types than carp.

This diff was started by benno@ at p2k17 (redistribute and config parser).
I added the interface part. jca@ contributed several improvements.

Comments, OKs?

Remi

Hi,

I'm trying to evaluate this new feature on my routers (in/out OSPF
only, no carp).

While it does the job for local connected/static networks (on the router), it doesn't do it for forwarded routes which I learn from remote OSPF routers.

LSAs from other routers are not changed by the "depend on" feature. But other
OSPF routers us the metric when they calculate their path.

If this does not answer your question, can you provide a simplified description
or schema of your network?

Is this normal behavior?

relevant config parts:

stub router no
# redistribute default
redistribute 192.168.1.0/24 set { metric 100 } depend on carp0

area 0.0.0.1 {
  interface vlan_int {
    metric 1
    depend on carp0
  }
  interface vlan_ext {
    metric 1
    depend on carp0
  }
}

192.168.1.0/24 (which is a local blackhole route) is propagated with
the correct metric,
either 65535 or 100, depended on the carp0 status.

Rest of ospf routes don't change metric on carp0 demotion.

And what about the networks direct connected on vlan_int and vlan_ext?
Above you state it works as you expected for direct connected networks.

Remi

Reply via email to