Re: [Ryu-devel] ryu-manager command not found
Brought to you by:
nz_gizmoguy
|
From: Diarmuid O B. <dia...@ob...> - 2019-05-08 12:25:08
|
Teame, If I were installing Ryu and mininet as a testbed like I think you are I would: Install the following ryu@ryu-mn:~$ *sudo apt-get install -**y **build-essential python-dev mtr tcpdump lynx iperf tshark fping wireshark net-tools curl python-pip python-eventlet python-routes python-webob python-paramiko openvswitch-switch **git python3-pip* ---> Configuring wireshark-common ---> Should non-superusers be able to capture packets? *<Yes>* ryu@ryu-mn:~$ *sudo chgrp wireshark /usr/bin/dumpcap*ryu@ryu-mn:~$ *sudo chmod 4711 /usr/bin/dumpcap*ryu@ryu-mn:~$ *sudo setcap cap_net_admin,cap_net_raw=eip /usr/bin/dumpcap* Install Mininet ryu@ryu-mn:~$ *git -C /home/ryu/ clone git://github.com/mininet/mininet <http://github.com/mininet/mininet>*ryu@ryu-mn:~$ *sudo **/home/**ryu**/mininet/util/install.sh -**n* Install Ryu ryu@ryu-mn:~$ *sudo apt-get install python3-ryu*ryu@ryu-mn:~$ *git clone https://github.com/martimy/ <https://github.com/martimy/flowmanager> ~/flowmanager* Test your testbed ryu@ryu-mn:~$ *ryu-manager ryu.app.simple_switch_13* loading app ryu.app.simple_switch_13 loading app ryu.controller.ofp_handler instantiating app ryu.app.simple_switch_13 of SimpleSwitch13 instantiating app ryu.controller.ofp_handler of OFPHandler In a different terminal run mininet ryu@ryu-mn:~$ *sudo mn --controller remote,ip=127.0.0.1 --switch ovsk,protocols=OpenFlow13 --mac --ipbase=10.1.1.0/24 <http://10.1.1.0/24> --topo single,4* In another terminal review the OvS within mininet ryu@ryu-mn:~$ *sudo ovs-vsctl show* db733a9e-588e-4a7c-9010-e888ffabb244 Bridge "s1" Controller "tcp:127.0.0.1:6653" is_connected: true Controller "ptcp:6654" fail_mode: secure Port "s1-eth2" Interface "s1-eth2" Port "s1" Interface "s1" type: internal Port "s1-eth4" Interface "s1-eth4" Port "s1-eth1" Interface "s1-eth1" Port "s1-eth3" Interface "s1-eth3" ovs_version: "2.9.0" ryu@ryu-mn:~$ *sudo ovs-ofctl -O OpenFlow13 dump-flows s1* cookie=0x0, duration=153.609s, table=0, n_packets=34, n_bytes=2596, priority=0 actions=CONTROLLER:65535 In the second terminal with the mininet shell mininet> *pingall* *** Ping: testing ping reachability h1 -> h2 h3 h4 h2 -> h1 h3 h4 h3 -> h1 h2 h4 h4 -> h1 h2 h3 *** Results: 0% dropped (12/12 received) Now re-review the flowtable in the OvS ryu@ryu-mn:~$ *sudo ovs-ofctl --**protocols** OpenFlow13 dump-flows s1* cookie=0x0, duration=23.971s, table=0, n_packets=3, n_bytes=238, priority=1,in_port="s1-eth2",dl_src=00:00:00:00:00:02,dl_dst=00:00:00:00:00:01 actions=output:"s1-eth1" cookie=0x0, duration=23.967s, table=0, n_packets=2, n_bytes=140, priority=1,in_port="s1-eth1",dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02 actions=output:"s1-eth2" cookie=0x0, duration=23.947s, table=0, n_packets=3, n_bytes=238, priority=1,in_port="s1-eth3",dl_src=00:00:00:00:00:03,dl_dst=00:00:00:00:00:01 actions=output:"s1-eth1" cookie=0x0, duration=23.941s, table=0, n_packets=2, n_bytes=140, priority=1,in_port="s1-eth1",dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:03 actions=output:"s1-eth3" cookie=0x0, duration=23.930s, table=0, n_packets=3, n_bytes=238, priority=1,in_port="s1-eth4",dl_src=00:00:00:00:00:04,dl_dst=00:00:00:00:00:01 actions=output:"s1-eth1" cookie=0x0, duration=23.915s, table=0, n_packets=2, n_bytes=140, priority=1,in_port="s1-eth1",dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:04 actions=output:"s1-eth4" cookie=0x0, duration=23.904s, table=0, n_packets=3, n_bytes=238, priority=1,in_port="s1-eth3",dl_src=00:00:00:00:00:03,dl_dst=00:00:00:00:00:02 actions=output:"s1-eth2" cookie=0x0, duration=23.887s, table=0, n_packets=2, n_bytes=140, priority=1,in_port="s1-eth2",dl_src=00:00:00:00:00:02,dl_dst=00:00:00:00:00:03 actions=output:"s1-eth3" cookie=0x0, duration=23.866s, table=0, n_packets=3, n_bytes=238, priority=1,in_port="s1-eth4",dl_src=00:00:00:00:00:04,dl_dst=00:00:00:00:00:02 actions=output:"s1-eth2" cookie=0x0, duration=23.865s, table=0, n_packets=2, n_bytes=140, priority=1,in_port="s1-eth2",dl_src=00:00:00:00:00:02,dl_dst=00:00:00:00:00:04 actions=output:"s1-eth4" cookie=0x0, duration=23.838s, table=0, n_packets=3, n_bytes=238, priority=1,in_port="s1-eth4",dl_src=00:00:00:00:00:04,dl_dst=00:00:00:00:00:03 actions=output:"s1-eth3" cookie=0x0, duration=23.835s, table=0, n_packets=2, n_bytes=140, priority=1,in_port="s1-eth3",dl_src=00:00:00:00:00:03,dl_dst=00:00:00:00:00:04 actions=output:"s1-eth4" cookie=0x0, duration=251.449s, table=0, n_packets=56, n_bytes=3968, priority=0 actions=CONTROLLER:65535 If you have wireshark running pointed to 127.0.0.1 you should see something like this [image: image.png] Now quit mininet and cleanup mininet> *quit* *** Stopping 1 controllers c0 *** Stopping 6 terms *** Stopping 4 links .... *** Stopping 1 switches s1 *** Stopping 4 hosts h1 h2 h3 h4 *** Done completed in 6.658 seconds ryu@ryu-mn:~$ *sudo mn --clean* *** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes killall controller ofprotocol ofdatapath ping nox_corelt-nox_core ovs-openflowd ovs-controllerovs-testcontroller udpbwtest mnexec ivs ryu-manager 2> /dev/null killall -9 controller ofprotocol ofdatapath ping nox_corelt-nox_core ovs-openflowd ovs-controllerovs-testcontroller udpbwtest mnexec ivs ryu-manager 2> /dev/null pkill -9 -f "sudo mnexec" *** Removing junk from /tmp rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log *** Removing old X11 tunnels *** Removing excess kernel datapaths ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/' *** Removing OVS datapaths ovs-vsctl --timeout=1 list-br ovs-vsctl --timeout=1 list-br *** Removing all links of the pattern foo-ethX ip link show | egrep -o '([-_.[:alnum:]]+-eth[[:digit:]]+)' ip link show *** Killing stale mininet node processes pkill -9 -f mininet: *** Shutting down stale tunnels pkill -9 -f Tunnel=Ethernet pkill -9 -f .ssh/mn rm -f ~/.ssh/mn/* *** Cleanup complete. Your testbed is operational. regards, Diarmuid -- *Irish by birth, located in Uganda but Munster by the grace of the Gods.* On Wed, 8 May 2019 at 14:57, teame kahsay <19t...@gm...> wrote: > thank for timely response Dear, im using mininet installed in vertualbox > and ryu installed in ubunto18.04. > if there is Pre-request to go with those environment please let me know. > or if you have a guide line please attach to my email. > kindly > > On Wed, May 8, 2019 at 12:45 PM Diarmuid O Briain <dia...@ob...> > wrote: > >> Teame, >> >>> >>> Try running this. >>> >>> ryu@ryu-mn:~$ *ryu-manager --observe-links --app-lists ~/flowmanager/flowmanager.py* *ryu.app.simple_switch_13* >>> loading app /home/ryu/flowmanager/flowmanager.py >>> ('You are using Python ', sys.version_info(major=2, minor=7, micro=12, releaselevel='final', serial=0)) >>> loading app ryu.app.simple_switch_13 >>> loading app ryu.topology.switches >>> loading app ryu.controller.ofp_handler >>> instantiating app None of DPSet >>> creating context dpset >>> creating context wsgi >>> instantiating app /home/ryu/flowmanager/flowmanager.py of FlowManager >>> instantiating app ryu.app.simple_switch_13 of SimpleSwitch13 >>> instantiating app ryu.topology.switches of Switches >>> instantiating app ryu.controller.ofp_handler of OFPHandler >>> (2549) wsgi starting up on http://0.0.0.0:8080 >>> >>> I assume you are using mininet to generate the network so to test run: >>> >>> ryu@ryu-mn:~$ *sudo mn --topo tree,depth=2,fanout=2 --switch ovsk --controller=remote,ip=127.0.0.1,port=6653 --mac**** Creating network*** Adding controller*** Adding hosts:h1 h2 h3 h4 *** Adding switches:s1 s2 s3 *** Adding links:(s1, s2) (s1, s3) (s2, h1) (s2, h2) (s3, h3) (s3, h4) *** Configuring hostsh1 h2 h3 h4 *** Starting controllerc0 *** Starting 3 switchess1 s2 s3 ...*** Starting CLI:mininet> >>> >>> Now browse to the server at port 8080, use Google Chrome as the browser. >>> >>> *http://localhost:8080/home/index.html <http://localhost:8080/home/index.html>* >>> >>> [image: image.png] >>> >>> regards, >>> >>> Diarmuid >>> >>> -- >>> >>> *Irish by birth, located in Uganda but Munster by the grace of the Gods.* >>> >>> >>> >>> >>> >>> On Wed, 8 May 2019 at 10:29, teame kahsay <19t...@gm...> wrote: >>> >>>> Thanks, I'll check it out. >>>> >>>> On Tue, May 7, 2019 at 8:17 PM Diarmuid O Briain <dia...@ob...> >>>> wrote: >>>> >>>>> Hi Teame, >>>>> >>>>> I would syggest installing the python3 version. I would also install Maen >>>>> Artimy's wonderful flowmanager application. >>>>> >>>>> ~$* sudo apt-get install python3-ryu* >>>>> ~$ *git clone https://github.com/martimy/flowmanager >>>>> <https://github.com/martimy/flowmanager> ~/flowmanager* >>>>> ~$ *ryu-manager ~/flowmanager/flowmanager.py ryu.app.simple_switch_13* >>>>> >>>>> regards, >>>>> >>>>> Diarmuid >>>>> -- >>>>> >>>>> *Irish by birth, located in Uganda but Munster by the grace of the >>>>> Gods.* >>>>> >>>>> >>>>> >>>>> >>>>> On Tue, 7 May 2019 at 17:57, Fernando Farias <fe...@gm...> wrote: >>>>> >>>>>> Dear Teame, >>>>>> >>>>>> Try install ryu via pip: >>>>>> >>>>>> pip3 install ryu >>>>>> >>>>>> best regards, >>>>>> >>>>>> >>>>>> >>>>>> Em ter, 7 de mai de 2019 às 08:33, Soe Ye Htet < >>>>>> soe...@gm...> escreveu: >>>>>> >>>>>>> Dear, >>>>>>> >>>>>>> Have you installed ryu controller in your Linux environment? >>>>>>> >>>>>>> Best regards, >>>>>>> Soe Ye Htet >>>>>>> Research Assistant >>>>>>> Chulalongkorn University >>>>>>> >>>>>>> On Tue, May 7, 2019 at 4:15 PM teame kahsay <19t...@gm...> >>>>>>> wrote: >>>>>>> >>>>>>>> hi, im new to ryu and generally to SDN, im starting learning using >>>>>>>> ryu controller. >>>>>>>> >>>>>>>> when i start doing exercise using the ryu book, examples, and >>>>>>>> starting executing the ryu app step by step, i got the error "ryu-manager >>>>>>>> command not found" in the controller co (root ) terminal. >>>>>>>> >>>>>>>> how can i fix this error >>>>>>>> _______________________________________________ >>>>>>>> Ryu-devel mailing list >>>>>>>> Ryu...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Best Regards, >>>>>>> Soe Ye Htet >>>>>>> Research Assistant (Chulalongkorn University) >>>>>>> +66647240647 >>>>>>> _______________________________________________ >>>>>>> Ryu-devel mailing list >>>>>>> Ryu...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> "A computer is like air conditioning: it becomes useless when you open >>>>>> windows." - Linus Torvalds >>>>>> >>>>>> Fernando N. N. Farias >>>>>> Computer Science PhD. Student >>>>>> Research Group member on Computer Networks and Multimedia >>>>>> Communications - GERCOM/UFPA >>>>>> Future Internet Team - GERCOM >>>>>> Federal University of Pará >>>>>> >>>>>> _______________________________________________ >>>>>> Ryu-devel mailing list >>>>>> Ryu...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel >>>>>> >>>>> |