VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
ONOS와 Raspberry Pi를 이용한 SDN 실증 환경 구축
1. ONOS와 Raspberry Pi 기반
가상/물리 SDN 실증 환경 구축과 응용 개발
경희대학교 이성원 교수
Email : drsungwon@khu.ac.kr
Web : http://mobilelab.khu.ac.kr
경희대학교 컴퓨터공학과 모바일컨버전스Lab 한상윤
Email : sangyun0628@khu.ac.kr
2. Mobile Convergence Laboratory 2
목차
A Table of Contents
ONOS
ONOS(Open Network Operating System) 소개, 아키텍처 분석, 설치 및 데모
Keyword : Distributed core,ON.Lab, maven, karaf
OpenVirteX
OVX 소개, Network Hypervisor와 가상화 플랫폼의 기능, 설치 및 데모
Keyword : Hypervisor, 네트워크 가상화 플랫폼, Resilient, elastic
Pi Stack Switch / SDN 구축
Raspberry Pi와 Open vSwitch를 이용한 SDN 테스트베드 구축
Keyword : Raspberry Pi, Open vSwitch, OpenFlow 스위치
Q&A
질의응답
Pi Stack Switch
4. • Carrier grade SDN OS for service providers
• SDN OS with scalability, high availability, high performance
and right abstractions
• By
Mobile Convergence Laboratory 4
16. Mobile Convergence Laboratory 16
High Availability
• Multiple Instance Clustering
• Fault tolerance using Distributed Core
• Five Nines availability
17. Mobile Convergence Laboratory 17
High Availability High Performance
• High Throughput
• ~500K-1M path setups/second
• High Volume
• ~500GB-1TB state data
• Low Latency
• 10~100ms
18. Mobile Convergence Laboratory 18
High Availability High Performance Scalability
• OSGi based OSS Karaf
Deploy, Config
• Distributed Clustering
Sync, Share
• Dynamic Clustering
19. Mobile Convergence Laboratory 19
High Availability High Performance Scalability White Box (Open)
Reference : ONOS wiki
25. ONOS Architecture
The changing history of architecture
Overall architecture
Subsystem Structure
Mobile Convergence Laboratory 25
26. Mobile Convergence Laboratory 26
The History of ONOS architecture
Founded - 2012
ONOS prototype 1
2013
(scalability, availability)
ONOS prototype 2
2013
(performance)
First Open
Avocet 1.0.0
2014.12.05
32. Architectural Tenets
Mobile Convergence Laboratory 32
• High availability, scalability and performance
• Strong abstractions and simplicity
• Protocol and device behavior independence
• Separation of concerns and modularity
40. Mobile Convergence Laboratory 40
ONOS Subsystems Structure
• Provider
• Interface with the network via
protocol-specific library
• Manager
• Receives information from
Providera and serves it to
application and service
• Store
• Synchronizing the information
received by the Manager
41. Scale-out / HA scenarios
Mobile Convergence Laboratory 41
42. Mobile Convergence Laboratory 42
Distributed
Core
Instance 1
Scale-out by Distributed Core (1)
Network Graph
Global network view
43. Mobile Convergence Laboratory 43
Distributed
Core
Instance 1 Instance 2 Instance 3
Scale-out by Distributed Core (2)
Network Graph
Global network view
44. Mobile Convergence Laboratory 44
Distributed
Core
Instance 1 Instance 2 Instance 3
HA by Distributed Core (1)
Network Graph
Global network view
45. Mobile Convergence Laboratory 45
Distributed
Core
Instance 1 Instance 2 Instance 3
HA by Distributed Core (2)
Network Graph
Global network view
46. Mobile Convergence Laboratory 46
Distributed
Core
Instance 1 Instance 2 Instance 3
HA by Distributed Core (3)
Network Graph
Global network view
49. Prerequisites
• Ubuntu 14.04 LTS 64bits
• 2GB or more RAM
• 2 or more processors
• 8GB or more storage
• Java 8 JDK
• Apache Maven(3.3.1 and later)
• Apache Karaf(3.0.3 and later)
• Git
Mobile Convergence Laboratory 49
51. 2. Configure Java Path
• on Ubuntu
$ env | grep JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-8-oracle
$ export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Mobile Convergence Laboratory 51
Single Instance Setting (2/10)
52. 3. Install Git
$ sudo apt-get install git-core
$ git --version
Mobile Convergence Laboratory 52
Single Instance Setting (3/10)
53. 4. Set Maven
$ cd; mkdir Downloads Applications
$ cd Downloads
$ wget http://archive.apache.org/dist/maven/maven-
3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz
$ tar -zxvf apache-maven-3.3.1-bin.tar.gz -C ../Applications/
Mobile Convergence Laboratory 53
Single Instance Setting (4/10)
54. 5. Set Karaf
$ cd Downloads
$ wget http://archive.apache.org/dist/karaf/3.0.3/apache-karaf-
3.0.3.tar.gz
$ tar -zxvf apache-karaf-3.0.3.tar.gz -C ../Applications/
Mobile Convergence Laboratory 54
Single Instance Setting (5/10)
55. 6. Clone ONOS
$ git clone https://gerrit.onosproject.org/onos/
$ cd onos
if> getting specific ONOS version
$ git checkout <ver>
Mobile Convergence Laboratory 55
Single Instance Setting (6/10)
56. 7. Configure ONOS Path
$ export ONOS_ROOT=~/onos
$ source $ONOS_ROOT/tools/dev/bash_profile
Mobile Convergence Laboratory 56
Single Instance Setting (7/10)
57. 8. Build ONOS
$ cd ~/onos
$ mvn clean install
Mobile Convergence Laboratory 57
빌드 성공
Single Instance Setting (8/10)
58. 9. Start ONOS CLI
$ karaf clean
Mobile Convergence Laboratory 58
Single Instance Setting (9/10)
59. 10. Start ONOS GUI
• start ONOS (ONOS CLI)
• In web browser
• http://localhost:8181/onos/ui/login.html
ID: karaf / PW: karaf
Mobile Convergence Laboratory 59
Single Instance Setting (10/10)
62. Mobile Convergence Laboratory 62
<Network Graph>
토폴로지 GUI와 Host 정보
<Node Info>
해당 노드(스위치)의 정보
Protocol / Ports / Flow
버전 및 지리적 정보
<ONOS Summary>
Network Element의 수
링크의 수
호스트의 수
Flow의 수…
64. ONOS Multiple Instances
Mobile Convergence Laboratory 64
- Download source code
- Build ONOS project
- Package the project
- Deploy the package
Deploy & Install
65. 1. Prepare multi machine
• 물리 머신 or 가상 머신
• 홀수의 머신이 필요( ∵ RAFT algorithm for distributed clustering)
• 물리 머신이라면
Java 설치 및 경로 설정(1,2), 환경 셋팅(4,5), 경로 설정(7) 필요
• 가상 머신이라면 그대로 복사
(주의! MAC 주소 수동 변경)
Mobile Convergence Laboratory 65
Multiple Instance Setting (1/6)
66. 2. cell script
• ~/onos/tools/test/cells 디렉토리에 FILE_NAME 파일에 다음과
같이 작성
• 머신과 환경에 맞게 작성
Mobile Convergence Laboratory 66
Multiple Instance Setting (2/6)
67. 3. Connect SSH
• 배포할 머신과 패키징을 받을 머신들끼리 연결
$ ssh-keygen -t rsa // 각 인스턴스 머신마다 key 생성
$ onos-push-keys $OC1 // 노드 개수 만큼
$ onos-push-keys $OC5
$ onos-verify-cell // 연결 확인
Mobile Convergence Laboratory 67
Multiple Instance Setting (3/6)
…
68. 4. Define control plane
• cell 명령어와 작성한 스크립트로 제어 평면에 대한 정의
$ cell FILE_NAME
Mobile Convergence Laboratory 68
Multiple Instance Setting (4/6)
69. 5. Packaging and Deploying
$ mvn clean install
$ onos-package
$ onos-install $OC1
$ onos-install $OC5
배포 및 실행, onos의 process PID가 반환
Mobile Convergence Laboratory 69
Multiple Instance Setting (5/6)
…
70. 6. Manage Multi instances
• CLI
$ onos -w $OC1 //cell script에 등록한 인스턴스 이름
또는
$ onos -w 192.168.56.101 //해당 인스턴스의 IP
• GUI in web
http://192.168.56.101:8181/onos/ui/login.html
//접속하고자 하는 인스턴스의 IP
Mobile Convergence Laboratory 70
Multiple Instance Setting (6/6)
72. ONOS Application (1/3)
• Apps are delivered via ONOS App aRchive (.oar) files
• pom.xml / features.xml / bundle 을 포함하여 .oar 파일 형태로 배포
• OAR 파일은 maven으로 빌드할 때, onos-maven-plugin에 의해 생성
• ONOS application 종류
• Bundle application
• Service Interface application
• Service Component application
Mobile Convergence Laboratory 72
73. ONOS Application (2/3)
• ONOS application 종류
• Bundle application
• API를 제공하지 않고 자체적으로 모든 기능을 수행
• Service Interface application
• 다른 app에서 접근가능한 API를 제공하는 형태 ex>CLI, REST api, GUI
• Service Component application
• Activate/Deactivate 등 메소드를 가진 형태
Mobile Convergence Laboratory 73
74. ONOS Application (3/3)
• Maven을 이용한 ONOS app 프로젝트 생성 방법
• maven template toolkit에 의해 skeleton code가 제공
• ONOS archetype
• onos-bundle-archetype
• $onos-create-app bundle [groupId] [artifactId]
• onos-cli-archetype
• $onos-create-app cli [groupId] [artifactId]
• onos-ui-archetype
• $onos-create-app ui [groupId] [artifactId]
Mobile Convergence Laboratory 74
API
https://wiki.onosproject.org/display/ONOS/Download+packages+and+tutorial+VMs
http://api.onosproject.org/1.3.0/
86. 3. Clone OpenVirteX
$ git clone https://github.com/OPENNETWORKINGLAB/OpenVirteX.git -b 0.0-MAINT
$ cd ~/OpenVirteX/scripts.
Mobile Convergence Laboratory 86
87. 4. Start OVX
$ sh ovx.sh
ex> 가상 네트워크 생성 및 Big Switch 생성
$ python ovxctl.py -n createNetwork tcp:localhost:30000 10.0.0.0 16
$ python ovxctl.py -n createSwitch DPID_1,DPID_2,DPID_3,DPID_4
<Tutorial & API Doc>
http://ovx.onlab.us/getting-started/tutorial/
http://ovx.onlab.us/documentation/api/
Mobile Convergence Laboratory 87