0
votes

I am trying to build a ryu application with starts and tries to get the owl topology. Therefor I’m using the get_link and get_switch function from the ryu.topology.api. Getting the switches is no problem but the list of links is always empty.

I tried using the get_all_link as well but the result is the same. So far I found a lot of examples were they use those functions but none of these work with my set up.

Here are some examples i tried: https://github.com/Ehsan70/RyuApps/blob/master/BasicTopoLearner.py

get_all_link(self) outputting all possible LINKs for a topo

My Ryu version is 4.32 and Im using the tree topology from mininet

Cheers and thanks for your help

1

1 Answers

1
votes

You have to enable the processing of lldp packets by the controller using the --observe-links option when starting ryu. Do

ryu-manager --observe-links your_ryu_app.py

Also if you try to get the links at the time mininet is building the topology you may get nothing. So try to put a timer to delay the get_all_links method, or try polling the switches using a monitor thread (see traffic monitor in Ryubook)