Jacu629
Jacu629

Reputation: 53

How can i "activate" the port disabled/blocked by STP using OpenFlow and Ryu controller, so i could forward packets through it?

I'm looking for the way to send packets using OpenFlow 1.3 protocol in SDN network in a topology with loop. My choice of controller is Ryu. To identify the hosts i'm catching ARP packets and to avoid floodstorm i'm using STP.

My problem is that when the path computed by my routing algorithm contains ports which are blocked/disabled by STP the connection can't be accomplished (hosts cannot ping each other).

After thinking it over i reached a conclusion that i need to "activate" disabled/blocked ports that are on my rounting path. But i cannot find any way to do that..

So now's the question: How can i achieve my solution? Is there any way to "activate" the ports in Ryu? Or if my solution is unachievable is there any other method i can use to solve this problem?

Upvotes: 2

Views: 1764

Answers (1)

nik
nik

Reputation: 746

To activate a port you send an ofp_port_mod message to the switch.

However, this will effectively disable STP, as you are opening up ports that may be part of a loop.

I think a better way of doing it might be for your routing algorithm to check if the port is disabled, by sending a OFPMP_PORT_DESCRIPTION message to the switch and reading the config field in the reply. You can then treat those ports as being down and compute a different path (although I don't know if that's feasible in your case.)

Having said that, if I'm reading the openflow specs (section 7.2.1 Port Structures) correctly, you should still be able to route through a BLOCKED port, you just can't flood through it. This is different to a DISABLED port.

Upvotes: 2

Related Questions