OSPF costs

55 views
Skip to first unread message

Simon Liénardy

unread,
Dec 9, 2013, 11:15:28 AM12/9/13
to auton...@googlegroups.com
Hi,

I would like to add ospf cost to the edges in the ".graphml" files.

As far as I understood the source code, some instructions are already written to allow to use this feature. 
According to design/igp.py, the name of the edges properties has to be "ospf_cost". (Am I correct?)

However, in compilers/device/router_base.py, the function ospf(self, node) does not retrieve the information about ospf costs (stored by igp.py) although it seems to try to do something that I did not understand.

What's the matter?

Are ospf costs supported? If yes, how to use them? If not, what can I do to make them work properly?

Thanks for your help.

Simon Knight

unread,
Dec 9, 2013, 1:41:56 PM12/9/13
to auton...@googlegroups.com
Hello,
It's grabbed in the base router compiler, which the Quagga compiler inherits:
https://autonetkit.readthedocs.org/en/latest/_modules/autonetkit/compilers/device/router_base.html#RouterCompiler.ospf

The design/igp.py copies the "ospf_cost" attribute from the input
graph to an attribute on the OSPF graph called "cost" - perhaps what
the confusion is.

Are they propagating into the final configs? Perhaps you could send me
the .graphml file you are using and I can try and replicate it her.

thanks
Simon
> --
> You received this message because you are subscribed to the Google Groups
> "AutoNetkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to autonetkit+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Message has been deleted

Simon Liénardy

unread,
Dec 10, 2013, 4:46:03 AM12/10/13
to auton...@googlegroups.com
Thanks for your quick answer.

You can find as attachment a simple test topology I use at the moment. My goal is to configure netkit labs that involve equal cost multipaths (to test a probing method).

The ospf_cost properties are not propagating into the final config.

I have another question : in order to modify the *.startup, /etc/*,... generated files, I have to modify templates/*.mako files. Am I correct? (I reinstalled a new quagga version in my netkit fs, and it is launched with the commands "zebra -d" and "ospfd -d", for instance.)

Best regards.

--
Simon Liénardy
test.graphml

Simon Knight

unread,
Dec 12, 2013, 4:45:30 PM12/12/13
to auton...@googlegroups.com
Hi,

On 10 December 2013 01:46, Simon Liénardy <simon.l...@gmail.com> wrote:
> Thanks for your quick answer.
>
> You can find as attachment a simple test topology I use at the moment. My
> goal is to configure netkit labs that involve equal cost multipaths (to test
> a probing method).
>
> The ospf_cost properties are not propagating into the final config.

It was a bug in ANK: https://github.com/sk2/autonetkit/issues/183
It's fixed now.
I was checking if an edge exists in the graph as a node.... which was
obviously failing!

Should be ok now if you pull the latest version from github, and I've
pushed it to Pytthon Package Index as 0.7.8

Equal cost multipaths should work fine in Netkit with AutoNetkit. It
can't do multiple links between the same (src, dst) pair yet though.

>
> I have another question : in order to modify the *.startup, /etc/*,...
> generated files, I have to modify templates/*.mako files. Am I correct? (I
> reinstalled a new quagga version in my netkit fs, and it is launched with
> the commands "zebra -d" and "ospfd -d", for instance.)

That's correct.
The netkit compiler specifies to use that folder to render the router
configs with.:
nidb_node.render.base = os.path.join("templates","quagga")

if you wanted to fork and have both sets, you could copy that folder
as "quagga2" and specify it as
nidb_node.render.base = os.path.join("templates","quagga2")

etc

Hope that helps.

Simon



>
> Best regards.
>
> --
> Simon Liénardy
>

Simon Liénardy

unread,
Dec 13, 2013, 6:00:38 AM12/13/13
to auton...@googlegroups.com
Wonderful ! Thanks a lot !




2013/12/12 Simon Knight <simon....@gmail.com>
You received this message because you are subscribed to a topic in the Google Groups "AutoNetkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autonetkit/EOYpd8cxpOQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autonetkit+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Simon Liénardy
Reply all
Reply to author
Forward
0 new messages