본문 바로가기

Information

[SDN}Mininet + ONOS 튜토리얼


ODL(OpenDayLight) 쪽에 데드락이 절려버려서 이러지도 저러지도 못하고 있다가


ONOS를 발견해서 해보고 있습니다 


현재 테스트 환경은 Ubuntu 18.04 LTS (GNU/Linux 4.15.0-23-generic x86_64) 입니다.



먼저 mininet 설치 


mira@opendaylight:~$ sudo apt-get install mininet


역시 편한 apt-get


mira@opendaylight:~$ sudo mn --test pingall

sudo: unable to resolve host opendaylight

*** No default OpenFlow controller found for default switch!

*** Falling back to OVS Bridge

*** Creating network

*** Adding controller

*** Adding hosts:

h1 h2

*** Adding switches:

s1

*** Adding links:

(h1, s1) (h2, s1)

*** Configuring hosts

h1 h2

*** Starting controller


*** Starting 1 switches

s1 ...

*** Waiting for switches to connect

s1

*** Ping: testing ping reachability

h1 -> h2

h2 -> h1

*** Results: 0% dropped (2/2 received)

*** Stopping 0 controllers


*** Stopping 2 links

..

*** Stopping 1 switches

s1

*** Stopping 2 hosts

h1 h2

*** Done

completed in 0.454 seconds

mira@opendaylight:~$


mininet 은 돌아가고


ONOS 홈페이지가서 최신버전 다운로드 


https://wiki.onosproject.org/display/ONOS/Downloads


mira@opendaylight:~$ wget http://repo1.maven.org/maven2/org/onosproject/onos-releases/1.13.1/onos-1.13.1.tar.gz

 
mira@opendaylight:~$ cd /onos-1.13.1/bin
mira@opendaylight:~/onos-1.13.1/bin$ ./onos-service start

mira@opendaylight:~/onos-1.13.1/bin$ ./onos-service start

Welcome to Open Network Operating System (ONOS)!
     ____  _  ______  ____
    / __ \/ |/ / __ \/ __/
   / /_/ /    / /_/ /\ \
   \____/_/|_/\____/___/

Documentation: wiki.onosproject.org
Tutorials:     tutorials.onosproject.org
Mailing lists: lists.onosproject.org

Come help out! Find out how at: contribute.onosproject.org

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.

onos> app activate org.onosproject.openflow
Activated org.onosproject.openflow
onos> apps -a -s
*   8 org.onosproject.hostprovider         1.13.1   Host Location Provider
*   9 org.onosproject.lldpprovider         1.13.1   LLDP Link Provider
*  10 org.onosproject.optical-model        1.13.1   Optical Network Model
*  11 org.onosproject.openflow-base        1.13.1   OpenFlow Base Provider
*  12 org.onosproject.openflow             1.13.1   OpenFlow Provider Suite
*  47 org.onosproject.drivers              1.13.1   Default Drivers



이걸 키고 해당 머신의 8181 포트로 http://192.168.0.19:8181/onos/ui/login.html 들어가면 웹인터페이스가 열림
물론, 항상 저상태로 둘수는 없을것 같은데, init폴더에 데몬을 올릴수 있는 스크립트가 있을것 같아서 저걸로 키고 끄면 될듯
일단 테스트가 우선이니 





https://wiki.onosproject.org/display/ONOS/The+ONOS+Web+GUI
GUI Configuration Notes
  • The onos-gui feature must be installed in ONOS.
  • The GUI listens on port 8181.
  • The base URL is /onos/ui; for example, to access the GUI on localhost, use: http://localhost:8181/onos/ui
  • The GUI has been developed to work on Google Chrome. The GUI has been tested on Safari and Firefox and minor compatibility adjustments have been made; these and other browsers may work, but have not been extensively tested, and are not actively supported, at this time.
  • The key bindings associated with any view will work on any keyboard. The "Cmd" (⌘) key on an Apple keyboard is bound to the same key as the "Windows" or "Alt" keys on Windows or other keyboards.

위키에 보면 기본 계정정보를 따라서 접속

Default username and password are onos/rocks.

ONOS를 보면 아무런 화면도 안나옴, mininet 을 실행하면



mira@opendaylight:~$ sudo mn --controller=remote,ip=127.0.0.1 --topo=tree,2,2
sudo: unable to resolve host opendaylight
*** Creating network
*** Adding controller
Unable to contact the remote controller at 127.0.0.1:6653
Unable to contact the remote controller at 127.0.0.1:6633
Setting remote controller to 127.0.0.1:6653
*** 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 hosts
h1 h2 h3 h4
*** Starting controller
c0
*** Starting 3 switches
s1 s2 s3 ...
*** Starting CLI:
mininet>

미니넷을 실행시키면 다음과 같이 토폴러지가 그려진것을 확인할수 있음