odl

15
My GOD Love you! and start Presentation with your name Dear

Upload: vahid-sadri

Post on 15-Jul-2015

103 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: ODL

My GODLove you! and start Presentation with your name

Dear

Page 2: ODL

SDNSoftware-Defiened Network

Vahid SadriIslamic azad university [email protected]

OpenDayLight

Page 3: ODL

SDN architecture

Mininet

Ryu,Pytric,Floodlight,OpenDayLight,…

My APP (Bundle)• Mac Learning• IP Learning• VPN Connection• IP Learning

LinuxMininet & ODL Controller

SDN_HUB_Tutorial.ova

Page 4: ODL

Steps To Start SDN via ODL

1- Run ODL Controller- GUI (Webbase)- OSGi

2- Run Mininet and Connect to ODL

3- Write ODL APP (Bundle)

Page 5: ODL

1- Enter to opendaylight Directory:

cd SDNHub_Opendaylight_Tutorial/distribution/opendaylight-osgi-adsal/target/distribution-osgi-adsal-1.1.0-SNAPSHOT-osgipackage/opendaylight

2- Run ODL with Follow Command

./run.sh

3- View ODL GUI(Enter Follow addr)

http://127.0.0.1:8080User: admin Pass:admin

Run ODL Controller

4- OSGi

Management Bundles (APPs) (install,uninstall, Start,Stop)

Page 6: ODL

Run Mininet and Connect to ODL Controller

sudo mn -- controller remoteubuntu@sdnhubvm:~$

Useful Command in mininet:Net,Dump,pingall,nodes,ports,xterm

Tets Communication between 2 Host:H1 ping H2

Show interface config of ex:h1H1 ifconfig

Page 7: ODL

How to write a new Bundle (APP)

- Language Programing to write APP is JAVA- Create Java APP using Maven- Use Eclipse for write and run code

Page 8: ODL

|-- Ip-learning

|--src

|--main

|--java

|--com

|--SDN

|--MyProject2

Creating the Maven Project Maven Directory Layout

2- mkdir –p ip-learning/src/main/java/com/SDN/MyProject2/

Create Directory Layout in Command Line:

1- cd SDNHub_Opendaylight_Tutorial/

Page 9: ODL

For any write APP, I need Three follow Files:

1. pom.xml (information about your project and install dependencies)

2. Activator.java (Life-Cycle of when Start or Stop Bundle)

3. My_App.java (My Codes)

Important Files

PacketHandler.java

Page 10: ODL

|-- Ip-learning-- pom.xml

|--src|--main

|--java|--com

|--SDN|--MyProject2

-- Activator.java-- PacketHandler.java

Important Files in Directory Layout

Page 11: ODL

How to Create 3 Important filespom.xmlActivator.javaPacketHandler.java

Page 12: ODL

SDNHub_Opendaylight_Tutorial/ip-learning$ vi pom.xml

mvn eclipse:eclipse

Steps to Write a Bundle

cd SDNHub_Opendaylight_Tutorial/ip-learning1

2From this POM file, Generates the Eclipse configuration files by executing:Check your internet connection in linux, so enter the follow command

SDNHub_Opendaylight_Tutorial/ip-learning$

Create pom.xml and Build Project for Eclipse

3 Import Project to Eclipse (Browse ip-learning Directory)

4 Create Activator.java & PacketHandler.java in path: /src/man/java

5 Build Project ( RightClick on Project -> Run As -> Maven Build )

A JAR file created in path: /Target/ IP_Learning-0.1.jar

Page 13: ODL

How to install My APP(IP_Learning-0.1.jar) toOpenDayLight

Page 14: ODL

OSGi > install file:/home/ubuntu/SDNHub_Opendaylight_Tutorial/ip-learning/target/IP_Learning-0.1.jar

Install my app on OSGi

Path of JAR file

OSGi > ss142 INSTALLED com.SDN.IP_Learning_0.1.0

OSGi > start 142

H1 ping H2 on Mininet to view results on OSGi mode

After Install APP, Enter SS Comand in OSGi mode:

Page 15: ODL

Don’t choose the one who is beautiful to the world; choose the one who makes your world beautiful.

The EndVahid Sadri