Benutzer-Werkzeuge

Webseiten-Werkzeuge


ryu-sdn-controller-mac-os-x-omniswitch

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
ryu-sdn-controller-mac-os-x-omniswitch [2014/07/30 16:47] – angelegt bennyryu-sdn-controller-mac-os-x-omniswitch [2024/06/09 10:29] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
-====== Ryu SDN-Controller auf MacOS X ======+====== Ryu SDN-Controller auf MacOS X installieren ======
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-An diesem Artikel wird gearbeitet.+An diesem Artikel wird gearbeitet. Work in Progress to extend this article!
 </WRAP> </WRAP>
  
-Notizen+===== Voraussetzungen ===== 
-mkdir ryu+  * Ich verwende Mac OS X v10.9 
 +  * Python v2.7 ist bereits an Bord 
 +  * ''pip'' (alles notwendige ist [[https://pip.pypa.io/en/latest/installing.html#install-or-upgrade-pip|hier]] beschrieben!) 
 +  * Ich empfehle dringend den Einsatz von ''virtualenv'' (''pip install virtualenv''
 +  * XCode v5.1.1 (Apple AppStore, wichtig sind die command-line Tools) 
 +  * XCode Command-Line Tools (''pip'' will einiges kompilieren) 
 +  * ''git'' (um sich die Beispiele vom Ryu-Projekt zu kopieren)
  
-Ich empfehle "virtualenv" zu verwenden. Dann noch "pip" und "easy_install" beschreiben. +===== Die Installation =====
-Beschreiben welches XCODE ich installiert habe (Command-Line Tools)+
  
-virtualenv ryu/+Ich empfehle die Installation in folgenden Schritten.
  
-Macbook:Python Benny$ source ryu/bin/activate+==== virtualenv erstellen & aktivieren ==== 
 +<code> 
 +Macbook:Python Benny$ virtualenv ryu-3.11 
 +New python executable in ryu-3.11/bin/python 
 +Installing setuptools, pip...done. 
 +Macbook:Python Benny$ source ryu-3.11/bin/activate 
 +(ryu-3.11)Macbook:Python Benny$  
 +</code>
  
-1. Versuch der Installation+==== lxml zuerst installieren ==== 
 +<WRAP center round important 60%> 
 +Es ist wichtig das Kommando wie unten beschrieben einzugeben! ''lxml'' kompiliert sonst (zumindest bei mir) nicht! 
 +</WRAP> 
 +<code> 
 +(ryu-3.11)Macbook:Python Benny$ STATIC_DEPS=true pip install lxml 
 +Downloading/unpacking lxml 
 +  Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded 
 +  Running setup.py (path:/Users/Benny/Python/ryu-3.11/build/lxml/setup.py) egg_info for package lxml 
 +  (... Jede Menge CLI-Kilometer ausgelassen ...) 
 +Successfully installed lxml 
 +Cleaning up... 
 +</code> 
 + 
 +==== Ryu installieren ==== 
 +<code> 
 +(ryu-3.11)Macbook:Python Benny$ pip install ryu 
 +Downloading/unpacking ryu 
 +  Downloading ryu-3.12.tar.gz (1.1MB): 1.1MB downloaded 
 +  Running setup.py (path:/Users/Benny/Python/ryu-3.11/build/ryu/setup.py) egg_info for package ryu 
 +  (... Jede Menge CLI-Kilometer ausgelassen ...) 
 +Successfully installed ryu eventlet msgpack-python netaddr oslo.config paramiko routes six webob greenlet argparse pycrypto ecdsa repoze.lru 
 +Cleaning up...     
 +</code> 
 +Hält man diese Reihenfolge __nicht__ ein, dann schlägt a) die Installation von ''lxml'' fehl b) vergisst der Ryu Installer dann ''greenlet''
 +<WRAP center round tip 60%> 
 +An dieser Stelle ist es sinnvoll sich die Beispiele von Ryu zu kopieren, siehe: [[ryu-sdn-controller-mac-os-x-omniswitch#bei_mir_fehlen_alle_beispiele_bzw_das_app_verzeichnis_fehlt|Bei mir fehlen die Beispiele!]] 
 +</WRAP> 
 + 
 +===== Ryu in Aktion! ===== 
 +<code> 
 +(ryu-3.11)Macbook:ryu-3.11 Benny$ bin/ryu-manager --verbose ../ryu-git/ryu/app/simple_switch_13.py 
 +loading app ../ryu-git/ryu/app/simple_switch_13.py 
 +loading app ryu.controller.ofp_handler 
 +instantiating app ryu.controller.ofp_handler of OFPHandler 
 +instantiating app ../ryu-git/ryu/app/simple_switch_13.py of SimpleSwitch13 
 +BRICK SimpleSwitch13 
 +  CONSUMES EventOFPPacketIn 
 +  CONSUMES EventOFPSwitchFeatures 
 +BRICK ofp_event 
 +  PROVIDES EventOFPPacketIn TO {'SimpleSwitch13': set(['main'])} 
 +  PROVIDES EventOFPSwitchFeatures TO {'SimpleSwitch13': set(['config'])} 
 +  CONSUMES EventOFPPortDescStatsReply 
 +  CONSUMES EventOFPEchoRequest 
 +  CONSUMES EventOFPSwitchFeatures 
 +  CONSUMES EventOFPErrorMsg 
 +  CONSUMES EventOFPHello 
 +</code> 
 + 
 +===== OmniSwitch in Ryu registrieren ===== 
 +<WRAP center round info 60%> 
 +Ich hab Urlaub! Danach werde ich diese Anleitung sicherlich noch erweitern .. :) 
 +</WRAP> 
 + 
 +==== OmniSwitch 6900 Konfiguration ==== 
 +<code> 
 +-> show configuration snapshot openflow  
 +! OPENFLOW: 
 +openflow logical-switch OFSwitch vlan 2 
 +openflow logical-switch OFSwitch controller 192.168.10.100:6633 
 +openflow logical-switch OFSwitch interfaces port 1/1-20 
 +</code> 
 + 
 +==== Ausgaben von Ryu ==== 
 +<code> 
 +(ryu)Macbook:ryu Benny$ ryu-manager --verbose ../ryu-git/ryu/app/simple_switch_13.py  
 +loading app ../ryu-git/ryu/app/simple_switch_13.py 
 +loading app ryu.controller.ofp_handler 
 +instantiating app ryu.controller.ofp_handler of OFPHandler 
 +instantiating app ../ryu-git/ryu/app/simple_switch_13.py of SimpleSwitch13 
 +BRICK SimpleSwitch13 
 +  CONSUMES EventOFPSwitchFeatures 
 +  CONSUMES EventOFPPacketIn 
 +BRICK ofp_event 
 +  PROVIDES EventOFPSwitchFeatures TO {'SimpleSwitch13': set(['config'])} 
 +  PROVIDES EventOFPPacketIn TO {'SimpleSwitch13': set(['main'])} 
 +  CONSUMES EventOFPSwitchFeatures 
 +  CONSUMES EventOFPEchoRequest 
 +  CONSUMES EventOFPHello 
 +  CONSUMES EventOFPErrorMsg 
 +  CONSUMES EventOFPPortDescStatsReply 
 +connected socket:<eventlet.greenio.GreenSocket object at 0x103763250> address:('192.168.10.2', 36544) 
 +hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x103763610> 
 +move onto config mode 
 +EVENT ofp_event->SimpleSwitch13 EventOFPSwitchFeatures 
 +switch features ev version: 0x4 msg_type 0x6 xid 0x84975d27 OFPSwitchFeatures(auxiliary_id=0,capabilities=79,datapath_id=537554651826897,n_buffers=256,n_tables=3) 
 +move onto main mode 
 +</code> 
 + 
 +===== Typische Fehlermeldungen bei der Installation ===== 
 +==== lxml: xmlversion.h file not found ==== 
 +An diesem Fehler ist mein erster Installationsversuch mit ''pip install ryu'' auch gescheitert. 
 +Nach einiger Suche habe ich in den Untiefen von "stackoverflow" den Tipp im Folgenden gefunden. 
 +<code>
 (ryu)Macbook:ryu Benny$ pip install ryu (ryu)Macbook:ryu Benny$ pip install ryu
 Downloading/unpacking ryu Downloading/unpacking ryu
Zeile 30: Zeile 135:
  
 #include "libxml/xmlversion.h" #include "libxml/xmlversion.h"
 +</code>
  
-Lösung (funktioniert zumindest bei mir):+**Lösung:** 
 +<code>
 (ryu)Macbook:ryu Benny$ STATIC_DEPS=true pip install lxml (ryu)Macbook:ryu Benny$ STATIC_DEPS=true pip install lxml
-Downloading/unpacking lxml +</code> 
-  Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded +  * Der Mac ist nun ein paar Sekunden mit kompilieren beschäftigt 
-  Running setup.py (path:/Users/Benny/Python/ryu/build/lxml/setup.py) egg_info for package lxml +  * Danach sollte ''pip install ryu'' problemlos durchlaufen 
-    checking for a BSD-compatible install... /usr/bin/install -c +  * Zumindest bei mir schlug der erste Start aber dann wiederum auch fehl: ''greenlet'' fehlte
-    checking whether build environment is sane... yes +
-    checking for a thread-safe mkdir -p... build-aux/install-sh -c -d +
-.... +
- +
-pip install ryu <- funktioniert dann+
  
 +==== pkg_resources.DistributionNotFound: greenlet>=0.3 ====
 +Nach der manuellen Korrektur mit ''lxml'', scheint das ''pip install ryu'' Kommando ''greenlet'' irgendwie vergessen zu haben.
 +<code>
 +(ryu-3.11)Macbook:ryu-3.11 Benny$ bin/ryu-manager ../ryu-git/ryu/app/simple_switch_13.py
 +Traceback (most recent call last):
 +  File "bin/ryu-manager", line 5, in <module>
 +    from pkg_resources import load_entry_point
 +  File "/Users/Benny/Python/ryu-3.11/lib/python2.7/site-packages/pkg_resources.py", line 2697, in <module>
 +    working_set.require(__requires__)
 +  File "/Users/Benny/Python/ryu-3.11/lib/python2.7/site-packages/pkg_resources.py", line 669, in require
 +    needed = self.resolve(parse_requirements(requirements))
 +  File "/Users/Benny/Python/ryu-3.11/lib/python2.7/site-packages/pkg_resources.py", line 572, in resolve
 +    raise DistributionNotFound(req)
 +pkg_resources.DistributionNotFound: greenlet>=0.3
 +</code>
  
 +**Lösung:**
 +<code>
 +(ryu-3.11)Macbook:ryu-3.11 Benny$ pip install greenlet
 +</code>
  
 +==== Bei mir fehlen alle Beispiele bzw. das /app Verzeichnis fehlt! ====
 +Die Beispiele werden von ''pip'' nicht mitinstalliert. Dies kann aber sehr leicht nachgeholt werden.
  
 +**Lösung:**
 +<code>
 +Macbook:Python Benny$ git clone https://github.com/osrg/ryu.git ryu-git
 +Cloning into 'ryu-git'...
 +remote: Counting objects: 14808, done.
 +remote: Compressing objects: 100% (134/134), done.
 +remote: Total 14808 (delta 80), reused 0 (delta 0)
 +Receiving objects: 100% (14808/14808), 18.27 MiB | 676.00 KiB/s, done.
 +Resolving deltas: 100% (10855/10855), done.
 +Checking connectivity... done.
 +</code>
ryu-sdn-controller-mac-os-x-omniswitch.1406738875.txt.gz · Zuletzt geändert: 2024/06/09 10:29 (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki