Hi Vardhan,
Thank you for sending the log. It seemed that dpid is not matching. > EVENT ofp_event->stplib EventOFPStateChange > [STP][INFO] dpid=0000000000000004: Join as stp bridge. > [STP][INFO] dpid=0000000000000002: Join as stp bridge. > [STP][INFO] dpid=0000000000000001: Join as stp bridge. ... > EVENT ofp_event->stplib EventOFPStateChange > [STP][INFO] dpid=00000010f33acb09: Join as stp bridge. ... Please remove the following comment-out and specify dpid in accordance with your environment. (https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_stp.py#L38-L47) Because simple_switch_stp.py is the sample application, dpid needs to be specified. Thanks, Iwase On 2015年04月10日 18:27, FIXED-TERM Vardhan Harsha (CR/AEH4) wrote: > Hi Iwase, > > When I use mininet to simulate the switches the RYU STP application work > flawlessly. > But while using Ovs switches on hardware the problems arises. > > Here is RYU-manager log: > > PYTHONPATH= ./bin/ryu-manager --observe-links --verbose > ryu/app/simple_switch_stp.py > loading app ryu/app/simple_switch_stp.py > loading app ryu.controller.ofp_handler > ... > EVENT ofp_event->stplib EventOFPStateChange > [STP][INFO] dpid=0000000000000004: Join as stp bridge. > [STP][INFO] dpid=0000000000000002: Join as stp bridge. > [STP][INFO] dpid=0000000000000001: Join as stp bridge. > > EVENT ofp_event->stplib EventOFPStateChange > [STP][INFO] dpid=00000010f33acb09: Join as stp bridge. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33acb09: [port=1] Send Config BPDU. > [dpid=00000010f33acb09][port=1] state=LISTEN > [STP][DEBUG] dpid=00000010f33acb09: [port=1] Start port state machine. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][INFO] dpid=00000010f33acb09: [port=1] DESIGNATED_PORT / LISTEN > [STP][DEBUG] dpid=00000010f33acb09: [port=2] Send Config BPDU. > [dpid=00000010f33acb09][port=2] state=LISTEN > [STP][DEBUG] dpid=00000010f33acb09: [port=2] Start port state machine. > [STP][INFO] dpid=00000010f33acb09: [port=2] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acafb: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acafb][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33acafb: [port=1] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acb09: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acb09][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33acb09: [port=1] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPStateChange > [STP][INFO] dpid=00000010f33aca7b: Join as stp bridge. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33aca7b: [port=1] Send Config BPDU. > [dpid=00000010f33aca7b][port=1] state=LISTEN > [STP][DEBUG] dpid=00000010f33aca7b: [port=1] Start port state machine. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][INFO] dpid=00000010f33aca7b: [port=1] DESIGNATED_PORT / LISTEN > [STP][DEBUG] dpid=00000010f33aca7b: [port=2] Send Config BPDU. > [dpid=00000010f33aca7b][port=2] state=LISTEN > [STP][DEBUG] dpid=00000010f33aca7b: [port=2] Start port state machine. > [STP][INFO] dpid=00000010f33aca7b: [port=2] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33aca7b: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33aca7b][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=1] DESIGNATED_PORT / DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=2] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33aca7b][port=2] state=DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=2] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acafb: [port=2] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acafb][port=2] state=DISABLE > [STP][INFO] dpid=00000010f33acafb: [port=2] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acb09: [port=2] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acb09][port=2] state=DISABLE > [STP][INFO] dpid=00000010f33acb09: [port=2] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acafb: [port=1] Link up. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33acafb: [port=1] Send Config BPDU. > [dpid=00000010f33acafb][port=1] state=LISTEN > [STP][INFO] dpid=00000010f33acafb: [port=1] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33aca7b: [port=1] Link up. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33aca7b: [port=1] Send Config BPDU. > [dpid=00000010f33aca7b][port=1] state=LISTEN > [STP][INFO] dpid=00000010f33aca7b: [port=1] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPacketIn > [STP][INFO] dpid=00000010f33acafb: [port=1] Receive superior BPDU. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acafb][port=1] state=BLOCK > [STP][INFO] dpid=00000010f33acafb: [port=1] DESIGNATED_PORT / BLOCK > [STP][INFO] dpid=00000010f33acafb: Non root bridge. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acafb][port=1] state=LISTEN > [STP][INFO] dpid=00000010f33acafb: [port=1] ROOT_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acb09: [port=1] Link up. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33acb09: [port=1] Send Config BPDU. > [dpid=00000010f33acb09][port=1] state=LISTEN > [STP][INFO] dpid=00000010f33acb09: [port=1] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33aca7b: [port=2] Link up. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33aca7b: [port=2] Send Config BPDU. > [dpid=00000010f33aca7b][port=2] state=LISTEN > [STP][INFO] dpid=00000010f33aca7b: [port=2] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acafb: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acafb][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33acafb: [port=1] DESIGNATED_PORT / DISABLE > EVENT stplib->SimpleSwitchStp EventTopologyChange > [STP][INFO] dpid=00000010f33acafb: Root bridge. > [dpid=00000010f33acafb] Receive topology change event. Flush MAC table. > EVENT ofp_event->stplib EventOFPPortStatus > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33aca7b: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33aca7b][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=1] DESIGNATED_PORT / DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=2] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33aca7b][port=2] state=DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=2] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acb09: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acb09][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33acb09: [port=1] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33aca7b: [port=1] Link up. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33aca7b: [port=1] Send Config BPDU. > [dpid=00000010f33aca7b][port=1] state=LISTEN > [STP][INFO] dpid=00000010f33aca7b: [port=1] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acafb: [port=1] Link up. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [STP][DEBUG] dpid=00000010f33acafb: [port=1] Send Config BPDU. > [dpid=00000010f33acafb][port=1] state=LISTEN > [STP][INFO] dpid=00000010f33acafb: [port=1] DESIGNATED_PORT / LISTEN > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33aca7b: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33aca7b][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33aca7b: [port=1] DESIGNATED_PORT / DISABLE > EVENT ofp_event->stplib EventOFPPortStatus > [STP][INFO] dpid=00000010f33acafb: [port=1] Link down. > EVENT stplib->SimpleSwitchStp EventPortStateChange > [dpid=00000010f33acafb][port=1] state=DISABLE > [STP][INFO] dpid=00000010f33acafb: [port=1] DESIGNATED_PORT / DISABLE. > > Is it an Ovs bug because as I have understood , Ovs drops the BPDU packets if > STP isn’t enabled on the switch. > Anyways hope the log helps figure out the problem. > > > > > Mit freundlichen Grüßen / Best regards > > Harsha Vardhan > Communication Technology (CR/AEH4) > > fixed-term.harsha.vard...@de.bosch.com > > > -----Ursprüngliche Nachricht----- > Von: Yusuke Iwase [mailto:iwase.yusu...@gmail.com] > Gesendet: Freitag, 10. April 2015 05:01 > An: FIXED-TERM Vardhan Harsha (CR/AEH4) > Cc: ryu-devel@lists.sourceforge.net > Betreff: Re: [Ryu-devel] Stp on Openvswitch > > Hi Vardhan, > > In my environment (on mininet), simple_switch_stp_13.py works well. > > > $ ovs-vsctl --version > ovs-vsctl (Open vSwitch) 2.3.90 > Compiled Apr 6 2015 16:38:58 > DB Schema 7.12.1 > $ > > > $ git diff > diff --git a/ryu/lib/packet/bpdu.py b/ryu/lib/packet/bpdu.py > index 8926b2a..1453434 100644 > --- a/ryu/lib/packet/bpdu.py > +++ b/ryu/lib/packet/bpdu.py > @@ -134,7 +134,7 @@ from ryu.lib import addrconv > > > # BPDU destination > -BRIDGE_GROUP_ADDRESS = '01:80:c2:00:00:00' > +BRIDGE_GROUP_ADDRESS = '01:80:c2:00:00:0e' > > > PROTOCOL_IDENTIFIER = 0 > $ > > > $ sudo python setup.py install > ... > running install_scripts > Installing ryu-manager script to /usr/local/bin > Installing ryu script to /usr/local/bin > $ > > > $ sudo ryu-manager simple_switch_stp_13.py > [sudo] password for ryu: > loading app simple_switch_stp_13.py > loading app ryu.controller.ofp_handler > instantiating app None of Stp > creating context stplib > instantiating app simple_switch_stp_13.py of SimpleSwitch13 > instantiating app ryu.controller.ofp_handler of OFPHandler > [STP][INFO] dpid=0000000000000001: Join as stp bridge. > ... > ... > [STP][INFO] dpid=0000000000000002: [port=1] DESIGNATED_PORT / FORWARD > [STP][INFO] dpid=0000000000000002: [port=2] ROOT_PORT / FORWARD > [STP][INFO] dpid=0000000000000002: [port=3] DESIGNATED_PORT / FORWARD > [STP][INFO] dpid=0000000000000003: [port=1] DESIGNATED_PORT / FORWARD > [STP][INFO] dpid=0000000000000003: [port=3] ROOT_PORT / FORWARD > [STP][INFO] dpid=0000000000000003: [port=2] NON_DESIGNATED_PORT / BLOCK > [STP][INFO] dpid=0000000000000001: [port=1] DESIGNATED_PORT / FORWARD > [STP][INFO] dpid=0000000000000001: [port=2] DESIGNATED_PORT / FORWARD > ... > $ > > > Would you mind sending us ryu-manager log as above? > > > Thanks, > Iwase > > On 2015年04月09日 19:08, FIXED-TERM Vardhan Harsha (CR/AEH4) wrote: >> Hello All , >> >> I have looped network with 3 computers running OpenVswitch version 2.0.2 and >> 2 host. so the network is as shown below. >> s1---------- >> | | >> h1----s2----------s3---h2 >> Ryu is running the STP application. I have also made changes in the source >> code of the bpdu changing their destination address as suggested previously. >> But still the stp application doesn’t work and it blocks all the ports. >> >> Can anyone please suggest a solution or guide me in the right direction. >> >> >> >> Mit freundlichen Grüßen / Best regards >> >> *Harsha Vardhan * >> Communication Technology (CR/AEH4) >> >> _fixed-term.Harsha.Vardhan@de.bosch.com_ >> <mailto:fixed-term.harsha.vard...@de.bosch.com> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT >> Develop your own process in accordance with the BPMN 2 standard >> Learn Process modeling best practices with Bonita BPM through live exercises >> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ >> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF >> >> >> >> _______________________________________________ >> Ryu-devel mailing list >> Ryu-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/ryu-devel >> > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel