software defined networking(sdn) vahid sadri

84
SDN Environment Vahid Sadri [email protected] Iran ftware-Defiened Networkin (SDN) In the name of God

Upload: vahid-sadri

Post on 16-Feb-2017

705 views

Category:

Engineering


12 download

TRANSCRIPT

Page 1: Software defined networking(sdn) vahid sadri

SDN Environment

Vahid [email protected]

Software-Defiened Networking(SDN)

In the name of God

Page 2: Software defined networking(sdn) vahid sadri

• Outline

1- Overview SDN2- What is OpenFlow?3- Start Project 1

• Requirements Project • Useful Linux commands• MiniNet• SSH Protocol• X11 (X-Windows)• Create Network in Mininet• Topologies• Controller (Test Remote Controller)

Page 3: Software defined networking(sdn) vahid sadri

SDNSoftware-defiened networking

Page 4: Software defined networking(sdn) vahid sadri

MotivationProblem Statement

• Complex carrier networks • with a large variety of proprietary nodes and hardware appliances.

• Launching new services is difficult and takes too long• Space and power to accommodate• requires just another variety of box, which needs to be integrated.

• Operation is expensive• Rapidly reach end of life• due to existing procure-design,-

integrate-deploy cycle.

Network functionalities are based on specific HW&SW

One physical node per role

Traditional Network model

Page 5: Software defined networking(sdn) vahid sadri

Sisyphus on Different Hills

Telco Operators

Equipment Vendors

SDOs

Operator 1

2-6 Years

Demand

Drive

StandardiseImplement

Sell

Deploy

Operator 2Operator n

Critical mass ofsupporters

Develop Deploy Publish

2-6 Months

Telco Cycle Service Providers Cycle

2-6 years 2-6 months

Service Providers

AVAILABLE AVAILABLEIdea !! Idea !!

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 6: Software defined networking(sdn) vahid sadri

• Very intensive in hardware

• Software not at the core

• Very intensive in software

• Hardware is a necessary base

x

HARDWARE SOFTWARE+

-

+

-

Traditional telcos Internet players

Adapt to survive: Telco evolution focus shifting from hardware to softwareSource: Adapted from D. Lopez Telefonica I+D, NFV

Enter the Software-Defined Era

Google, FacebookAT&T, Telefonica, Telebras

Page 7: Software defined networking(sdn) vahid sadri

Trends• High performance industry

standard servers shipped in very high volume

• Convergence of computing, storage and networks

• New virtualization technologies that abstract underlying hardware yielding elasticity, scalability and automation

• Software-defined networking• Cloud services• Mobility, explosion of devices and

traffic

Challenges• Huge capital investment to deal with

current trends• Network operators face an increasing

disparity between costs and revenues• Complexity: large and increasing

variety of proprietary hardware appliances in operator’s network

• Reduced hardware lifecycles• Lack of flexibility and agility: cannot

move network resources where & when needed

• Launching new services is difficult and takes too long. Often requires yet another proprietary box which needs to be integrated

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 8: Software defined networking(sdn) vahid sadri

A means to make the network more flexible and simple by minimising dependence on HW constraints

v

Network Functions are SW-based over well-known HW Multiple roles over same HW

ORCHESTRATION, AUTOMATION & REMOTE INSTALL

DPIBRAS

GGSN/SGSN

Firewall

CG-NAT

PE Router

VIRTUAL APPLIANCES

STANDARD HIGH VOLUME SERVERS

Virtualised Network Model: VIRTUAL APPLIANCE APPROACHv

Network Functions are based on specific HW&SW One physical node per role

DPIBRAS GGSN/SGSN

Session Border ControllerFirewall CG-NAT

PE Router

Traditional Network Model: APPLIANCE APPROACH

The NFV Concept

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 9: Software defined networking(sdn) vahid sadri

BRAS

FirewallDPI

CDN

Tester/QoEmonitor

WANAcceleration

MessageRouter

Radio AccessNetwork Nodes

CarrierGrade NAT

Session BorderController

Network Virtualisation Approach

PE RouterSGSN/GGSN

Independent Software Vendors

Standard High VolumeEthernet Switches

Standard High Volume Storage

Standard High Volume Servers

Orchestrated,automatic &remote install.

• Fragmented non-commodity hardware.• Physical install per appliance per site.• Hardware development large barrier to entry for new

vendors, constraining innovation & competition.

Classical Network Appliance Approach

Target

Source: NFV

Page 10: Software defined networking(sdn) vahid sadri

Network Functions Virtualization• Network Functions Virtualization is about implementing network functions in

software - that today run on proprietary hardware - leveraging (high volume) standard servers and IT virtualization

• Supports multi-versioning and multi-tenancy of network functions, which allows use of a single physical platform for different applications, users and tenants

• Enables new ways to implement resilience, service assurance, test and diagnostics and security surveillance

• Provides opportunities for pure software players• Facilitates innovation towards new network functions and services that are only

practical in a pure software network environment• Applicable to any data plane packet processing and control plane functions, in

fixed or mobile networks• NFV will only scale if management and configuration of functions can be

automated• NFV aims to ultimately transform the way network operators architect and

operate their networks, but change can be incrementalSource: Adapted from D. Lopez Telefonica I+D, NFV

Page 11: Software defined networking(sdn) vahid sadri

Benefits & Promises of NFV• Reduced equipment costs (CAPEX)

• through consolidating equipment and economies of scale of IT industry.

• Increased speed of time to market • by minimising the typical network operator cycle of innovation.

• Availability of network appliance multi-version and multi-tenancy,• allows a single platform for different applications, users and tenants.

• Enables a variety of eco-systems and encourages openness. • Encouraging innovation to bring new services and generate new

revenue streams.

Source: NFV

Page 12: Software defined networking(sdn) vahid sadri

Benefits & Promises of NFV• Flexibility to easily, rapidly, dynamically provision and

instantiate new services in various locations • Improved operational efficiency

• by taking advantage of the higher uniformity of the physical network platform and its homogeneity to other support platforms.

• Software-oriented innovation to rapidly prototype and test new services and generate new revenue streams

• More service differentiation & customization • Reduced (OPEX) operational costs: reduced power, reduced

space, improved network monitoring• IT-oriented skillset and talent

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 13: Software defined networking(sdn) vahid sadri

So, why we need/want NFV(/SDN)?1. Virtualization: Use network resource without worrying about where it is physically located, how much it is, how it is organized, etc.2. Orchestration: Manage thousands of devices3. Programmable: Should be able to change behavior on the fly.4. Dynamic Scaling: Should be able to change size, quantity5. Automation6. Visibility: Monitor resources, connectivity7. Performance: Optimize network device utilization8. Multi-tenancy9. Service Integration10. Openness: Full choice of modular plug-ins

Note: These are exactly the same reasons why we need/want SDN.Source: Adapted from Raj Jain

Page 14: Software defined networking(sdn) vahid sadri

NFV and SDN • NFV and SDN are highly complementary• Both topics are mutually beneficial but not dependent on each

other

NetworkFunctions

Virtualization

SoftwareDefined

NetworkingOpen

Innovation

Creates competitive supply of innovative applications by third parties

Creates network abstractions to enable faster innovation

Reduces CAPEX, OPEX, Space & Power Consumption

Source: NFV

Page 15: Software defined networking(sdn) vahid sadri

NFV vs SDN• NFV: re-definition of network equipment architecture• NFV was born to meet Service Provider (SP) needs:

• Lower CAPEX by reducing/eliminating proprietary hardware• Consolidate multiple network functions onto industry standard

platforms• SDN: re-definition of network architecture• SDN comes from the IT world:

• Separate the data and control layers, while centralizing the control

• Deliver the ability to program network behavior using well-defined interfaces

Page 16: Software defined networking(sdn) vahid sadri

Network equipment as Black boxes

Open interfaces (OpenFlow) for instructing the boxes what to do

SDN

Boxes with autonomousbehaviour Decisions are taken out of the box

FEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWAREFEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWARE

FEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWAREFEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWARE

SDN

Adapting OSS to manage black boxes Simpler OSS to manage the SDN controller

SDNFEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWAREFEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWARE

FEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWAREFEATURE FEATURE

OPERATING SYSTEM

SPECIALIZED PACKET FORWARDING HARDWARE

Software Defined Networking

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 17: Software defined networking(sdn) vahid sadri

Scope of NFV and OpenFlow/SDN

Source: NEC

Page 18: Software defined networking(sdn) vahid sadri

Networking with SDN & NFV

Source: NEC

Page 19: Software defined networking(sdn) vahid sadri

(Network Virtualization)2 = SDN + NFV

0 SDN: Software Defined Networking

NFV: Network Functions Virtualisation

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 20: Software defined networking(sdn) vahid sadri

Some Use Case Examples…not in any particular order

• Switching elements: BNG, CG-NAT, routers. • Mobile network nodes: HLR/HSS, MME, SGSN, GGSN/PDN-GW.• Home networks: Functions contained in home routers and set top boxes to create virtualised

home environments.• Tunnelling gateway elements: IPSec/SSL VPN gateways.• Traffic analysis: DPI, QoE measurement.• Service Assurance: SLA monitoring, Test and Diagnostics.• NGN signalling: SBCs, IMS.• Converged and network-wide functions: AAA servers, policy control and charging platforms.• Application-level optimisation: CDNs, Cache Servers, Load Balancers, Application Accelerators.• Security functions: Firewalls, virus scanners, intrusion detection systems, spam protection.

Source: NFV

Page 21: Software defined networking(sdn) vahid sadri

The ETSI NFV ISG• Global operators-led Industry

Specification Group (ISG) under the auspices of ETSI– ~150 member organisations

• Open membership– ETSI members sign the “Member

Agreement”– Non-ETSI members sign the

“Participant Agreement”– Opening up to academia

• Operates by consensus– Formal voting only when required

• Deliverables: White papers addressing challenges and operator requirements, as input to SDOs– Not a standardisation body by itself

• Currently, four WGs and two EGs– Infrastructure– Software Architecture– Management & Orchestration– Reliability & Availability– Performance & Portability– Security

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 22: Software defined networking(sdn) vahid sadri

High-level Architecture

Page 23: Software defined networking(sdn) vahid sadri

NFV Layers

NFV Infrastructure

End Point

End Point

E2E Network Service

Compute Storage NetworkHW Resources

Virtualization LayerVirtualization SW

Virtual Compute

Virtual Storage

Virtual Network

Virtual Resources

Logical AbstractionsNetwork Service

VNF VNF VNF

VNF VNF

Logical Links

VNF Instances

VNF VNF VNFSW Instances

VNF : Virtualized Network Function

VNF

Source: Adapted from D. Lopez Telefonica I+D, NFV

Page 24: Software defined networking(sdn) vahid sadri

Rethinking relayering

Page 25: Software defined networking(sdn) vahid sadri

یک تعریف خیلی ساده

افزاری نرم صورت به شبکه مدیریت

oچرا؟o داره؟ مشکلی چه ما فعلی های شبکه مگرo میشه؟ چی نباشه اگرo میشه؟ چی باشه اگرo میخوره؟ ما درد چه به اصال

Page 26: Software defined networking(sdn) vahid sadri

26

Limitations of Current Networks

Switches

Page 27: Software defined networking(sdn) vahid sadri

27

Limitations of Current Networks

• Enterprise networks are difficult to manage

• “New control requirements have arisen”:• Greater scale• Migration of VMS

• Implement new ideas• How to easily configure huge networks?

Page 28: Software defined networking(sdn) vahid sadri

28

• Old ways to configure a network

Limitations of Current Networks

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

OperatingSystem

OperatingSystem

OperatingSystem

OperatingSystem

OperatingSystem

App App App

Page 29: Software defined networking(sdn) vahid sadri

29

Limitations of Current Networks

Million of linesof source code

Billions of gates

Many complex functions into infrastructure

OSPF, BGP, multicast, differentiated services,Traffic Engineering, NAT, firewalls, …

Specialized Packet Forwarding Hardware

OperatingSystem

Feature Feature

Cannot dynamically change according to network conditions

Page 30: Software defined networking(sdn) vahid sadri

30

• No control plane abstraction for the whole network!

• It’s like old times – when there was no OS…

Limitations of Current Networks

Wilkes with the EDSAC, 1949

Page 31: Software defined networking(sdn) vahid sadri

Cisco, IBM, Alcatel, Juniper Networks, Broadcom, Citrix, Dell, Google, HP,

Intel, NEC,vmWare and Verizon

Cisco ONE

NSX

Page 32: Software defined networking(sdn) vahid sadri

32

Idea: An OS for Networks

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

OperatingSystem

OperatingSystem

OperatingSystem

OperatingSystem

OperatingSystem

App App App

Closed

Page 33: Software defined networking(sdn) vahid sadri

33

Idea: An OS for Networks

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

App App App

Specialized Packet Forwarding Hardware

OperatingSystem

OperatingSystem

OperatingSystem

OperatingSystem

OperatingSystem

App App App

Network Operating System

Control Programs (Route,Forwarding,VPN,LB,..)

Page 34: Software defined networking(sdn) vahid sadri

34

Idea: An OS for Networks

Simple Packet Forwarding Hardware

Simple Packet Forwarding Hardware

Simple Packet Forwarding Hardware

Simple Packet Forwarding Hardware Simple Packet

Forwarding Hardware

Network Operating System

Control Programs (Route,Forwarding,VPN,LB,..)

OpenFlow Protocol (SSL/TCP)Port 6633

Page 35: Software defined networking(sdn) vahid sadri

What is OpenFlow?

How it helps SDN

Page 36: Software defined networking(sdn) vahid sadri

از پروتکل SDNقبل با باید

OpenFlowشویم آشنا

Page 37: Software defined networking(sdn) vahid sadri

OpenFlow

Defines the part of the router architecture that decides what to do with packets arriving on an inbound interface.

that gives access to the forwarding plane of a network switch or router over the network.OpenFlow is a communications protocol

Forwarding PlaneIn routing, the Forwarding Plane, sometimes called the Data Plane

Page 38: Software defined networking(sdn) vahid sadri

OpenFlowپروتکل به عنوان اصلي ترين جزء شبکه هاي

(Software Defined Networking )SDN

Page 39: Software defined networking(sdn) vahid sadri

پروتکل از استفاده با خصوصی OpenFlowما دیگر تجهیزات یا سوئیچ زنیم حرفبا می

پروتکل باید تجهیزات که باشید داشته کند OpenFlowتوجه پشتیبانی رارا ما حرف وگرنه

نمی فهمدددددد

Page 40: Software defined networking(sdn) vahid sadri

40

• OpenFlow

Structure of the current devices

Page 41: Software defined networking(sdn) vahid sadri

41

• OpenFlow

Data Path (Hardware)

OpenFlow

OpenFlow Controller

OpenFlow Protocol (SSL/TCP)

POX,Ryu,Pyretic,…

Control Path(os)

Page 42: Software defined networking(sdn) vahid sadri

42

• OpenFlow Switching Controller

Server Controller(Linux ubuntu)

HardwareLayer

SoftwareLayer

OpenFlow Table

MACsrc

MACdst

IPSrc

IPDst

TCPsport

TCPdport Action

OpenFlow Client

**5.6.7.81.2.3.4** port 1

port 4port 3port 2port 1

1.2.3.45.6.7.8 42

5.6.7.8 port 11.2.3.4

Page 43: Software defined networking(sdn) vahid sadri

43

• OpenFlow Table Entry

SwitchPort

MACsrc

MACdst

Ethtype

VLANID

IPSrc

IPDst

IPProt

TCPsport

TCPdport

Rule Action Stats

+ mask

Packet + byte counters

1.Forward packet to port(s)2.Encapsulate and forward to controller3.Drop packet4.Send to normal processing pipeline5.…

Page 44: Software defined networking(sdn) vahid sadri

OpenFlow 01.1234Versions

More information (Historical information about version of the OpenFlow )

Page 45: Software defined networking(sdn) vahid sadri

Mininet

Page 46: Software defined networking(sdn) vahid sadri

MiniNetThe main difference between simulation and emulation is that simulation is done all in software and emulation is done in hardware and software.

Emulation allows developers to see the real-time interactions between different hardware and software models.

Mininet is a Software Emulator for prototyping a large network on a single machine

Enter to mininet.org

Page 47: Software defined networking(sdn) vahid sadri

: داریم نیاز پروژه این برای که هایی برنامه اکثر

Linux Windows

1- A Linux Distribution (in my project Ubuntu)

2- Mininet

3- Controller (pox,nox,Ryu,Pyretic,…)

4- Wireshark (more information)

5- X11 Client (Xinit,xview-clients)

1- Virtualization Product (VirtualBox,vmWare)

2- SSH Client (Putty.exe)

3- X11 Server (Xming Server for windows)

sdn-sadri.ovaDownload

Page 48: Software defined networking(sdn) vahid sadri

لینوکس با کار شروع برای کاربردی :دستوراتCommand Description

1 Pwd جاری دایرکتوری مسیر نمایش2 Ls جاری مسیر فایلهای و ها پوشه لیست نمایش3 Ifconfig شبکه کارت تنظیمات نمایش4 Ping

5 Apt-get نیاز مورد های برنامه نصب،حذف،بروزرسانی6 Poweroff,shutdown,init 0

7 Reboot,init 6

8 Su Switch User | by default su mean switch user to Root (superuser)

9 Passwd Change password current user

10 sudo Switch User and Doing | by default sudo in Root

11 Vi,nano Text Editor

12 Man Manual (Help) | Help Command, Ex: man pwd

13 Service Services manager | Ex: service

14 dhclient DHCP Client | -r option for Release interface

Page 49: Software defined networking(sdn) vahid sadri

sudo /etc/init.d/networking {stop|start|restart}

Ifconfig <eth0> down | up خاص اینترفیس یک کردن فعال و غیرفعال

Sudo ifdown –a شبکه کارتهای همه کردن فعال غیرSudo ifup –a شبکه کارتهای همه کردن فعال

Sudo ifdown <eth0> خاص اینترفیس یک کردن غیرفعالSudo ifup <eth0> خاص اینترفیس یک کردن فعال

• Interfaces Command

Page 50: Software defined networking(sdn) vahid sadri

SSHSecure SHellSecure Shell (SSH) is a cryptographic network protocol for secure data communication

پایه بر امن ارتباطی پروتکل گذاری TPC/IPیک رمز با که است گیرنده سرویس و دهنده سرویس بینمیکند جلوگیری مسیر طول در اطالعات افشای از سرور و کالینت بین ها داده

Port 22

Page 51: Software defined networking(sdn) vahid sadri

MininetMy Client

Linux Ubuntu Windows

SSH Server SSH Client

SSH ProtocolPort 22

Putty.exe More information

Page 52: Software defined networking(sdn) vahid sadri

X11 provides the basic framework for a GUI environment

X11 محیط یک برای امکانات ترین ای با ) GUIپایه ارتباط ها، پنجره نمایش و رسم مانند کند می فراهم راو ...( کیبرد و ماوس

X11 X-Windows

مثال:ساعت • نمایشفایرفاکس • کردن بازکردن • باز ما پروژه در Wiresharkیا

Page 53: Software defined networking(sdn) vahid sadri

xclock

Page 54: Software defined networking(sdn) vahid sadri

اندازی راه کنیم؟؟؟ X11 برای چیکار باید

MininetMy Client

X11 Client X11 Server

Linux-mininet# xclock

X11 Forwarding

X11 Forwarding GUI

Page 55: Software defined networking(sdn) vahid sadri

X11 Client X11 Server

Xinit ming#Sudo apt-get install xinit#Sudo apt-get install xview-clients#Sudo apt-get install x11-apps

http://sourceforge.net/projects/xming/

Download & Install

X Window System Server for Windows #Sudo apt-get update

#Sudo startx

( منابع بروزرسانی لینوکس( Repositoryبرای

xinitاجرای

Page 56: Software defined networking(sdn) vahid sadri

اجرا X11نحوه

برنامه- 1 ویندوز Xming serverابتدا روی را

کنیم می اجرا

با- 2 ارتباط برای بعد به این از MiniNetاز

aطریقSSH بایدطی را شده مشخص عکس در که مراحلی

کنید

گزینه- 3 .Enable X11 forwardingو بزنید تیک راقسمت Mininetسرور IPسپس- 4 در را

Session به و میکنیم قابلیت MiniNetوارد باX11. شویم می متصل

192.168.56.102

Page 57: Software defined networking(sdn) vahid sadri

در شبکه یک Mininetساخت

mnCommand

Enter to MiniNet

Page 58: Software defined networking(sdn) vahid sadri

ساخت یک شبکه مجازی استMiniNetهدف

Hosts (Pc)SwitchesControllers (Ryu,Pyretic)

Page 59: Software defined networking(sdn) vahid sadri

*** Creating network*** Adding controller*** Adding hosts:h1 h2*** Adding switches:s1*** Adding links:(h1, s1) (h2, s1)*** Configuring hostsh1 h2*** Starting controller*** Starting 1 switchess1*** Starting CLI:mininet>

Page 60: Software defined networking(sdn) vahid sadri

Documented commands (type help <topic>):========================================

Command Descriptions

1 EOF از mininetخروج2 Exit از mininetخروج3 Quit از mininetخروج4 Time در را دستور یک اجرای زمان mininetمدت

دهد می5 Sh دستور یک داخل Shellاجرای که زمانی

mininet هستیم6 intfs شبکه اینترفیسهای همه لیست7 Gterm,xterm Xterm برپایه استاندارد ترمینال -Xیک

windowsGterm = GNOME Terminal

8 Pingall Ping ها هاست همه بین9 Pingallfull Ping جزئیات با ولی ها هاست همه بین

بیشتر10 Dpctl کنترل برای سوئیچ Flow Tableابزاری یک

استفاده یابی عیب برای ابزار این از معموال. شود می

11 Link در لینک یک کردن غیرفعال و فعال برایتوپولوژی

12 help راهنما13 nodes دهد می نشان را ما شبکه نودهای تمام14 iperf دو بین باند پهنای محاسبه برای ابزای

هاست15 iprefudp دو بین باند پهنای کارایی تست برای ابزاری

مثال خاص باند پهنای یک تعریف با هاستمگابایت 20

16 dump میدهد ها نود مورد در اطالعاتی17 net دهد می را شبکه اتصاالت لیست18 Source فایل یک از دستورات یکسری خواندی19 Pingpair برای بیشتر هاست، دو اولین بین پینگ

. میشود استفاده سریع های تست20 Pingpaifull بیشتر جزئیات با ولی باال دستور مانند21 py پایتون عبارت یک اجرای22 Noecho خروجی نمایش بدون دستور یک اجرای

Page 61: Software defined networking(sdn) vahid sadri

MiniNet Topologies

Page 62: Software defined networking(sdn) vahid sadri

sudo mn

*** Creating network*** Adding controller*** Adding hosts:h1 h2*** Adding switches:s1*** Adding links:(h1, s1) (h2, s1)*** Configuring hostsh1 h2*** Starting controller*** Starting 1 switchess1

• Default Topology

Page 63: Software defined networking(sdn) vahid sadri

sudo mn --topo single,3

mininet> neth1 h1-eth0:s1-eth1h2 h2-eth0:s1-eth2h3 h3-eth0:s1-eth3s1 lo: s1-eth1:h1-eth0 s1-eth2:h2-eth0 s1-eth3:h3-eth0

• Single

Page 64: Software defined networking(sdn) vahid sadri

sudo mn --topo reserved,3

mininet> neth1 h1-eth0:s1-eth3h2 h2-eth0:s1-eth2h3 h3-eth0:s1-eth1s1 lo: s1-eth1:h3-eth0 s1-eth2:h2-eth0 s1-eth3:h1-eth0

• Reserved

Single:h1 h1-eth0:s1-eth1h2 h2-eth0:s1-eth2h3 h3-eth0:s1-eth3

Page 65: Software defined networking(sdn) vahid sadri

sudo mn --topo linear,3

mininet> neth1 h1-eth0:s1-eth1h2 h2-eth0:s2-eth1h3 h3-eth0:s3-eth1s1 lo: s1-eth1:h1-eth0 s1-eth2:s2-eth2s2 lo: s2-eth1:h2-eth0 s2-eth2:s1-eth2 s2-eth3:s3-eth2s3 lo: s3-eth1:h3-eth0 s3-eth2:s2-eth3

• Linear A serial connection with N switches and N hosts

Page 66: Software defined networking(sdn) vahid sadri

sudo mn --topo tree,3

mininet> neth1 h1-eth0:s3-eth1h2 h2-eth0:s3-eth2...

• Tree A multiple level topology with N levels and TWO hosts per switch

Page 67: Software defined networking(sdn) vahid sadri

• Custom Topologies Using a simple Python API

Cd /home/mininet/mininet/custom/mininet@mininet:~$

README topo-2sw-2host.py

mininet@mininet:~$ ls

Python API

mininet@mininet:~$ Vi topo-2sw-2host.py

# Add links self.addLink( leftHost, leftSwitch ) self.addLink( leftSwitch, rightSwitch ) self.addLink( rightSwitch, rightHost )

# Add hosts and switches leftHost = self.addHost( 'h1' ) rightHost = self.addHost( 'h2' ) leftSwitch = self.addSwitch( 's3' ) rightSwitch = self.addSwitch( 's4' )

topos = { 'mytopo': ( lambda: MyTopo() )

Page 68: Software defined networking(sdn) vahid sadri

• To start up a mininet with the provided custom topology, do:

sudo mn --custom custom_example.py --topo mytopo

sudo mn --custom /home/mininet/mininet/custom/topo-2sw-2host.py --topo mytopo

Page 69: Software defined networking(sdn) vahid sadri

• Controller

Page 70: Software defined networking(sdn) vahid sadri

Name Versions Language Description

NOX 1.0 C++ The original OpenFlow controller. Developed by Nicira and donated to research in 2008.

POX 1.0 Python POX is NOX's Python-only younger sibling and is designed for rapid prototyping.

Open Daylight 1.0, 1.3 Java Industry supported (Cisco, Brocade, etc) Linux Foundation project. OpenDaylight has

attracted considerable attention over the past year.

Beacon 1.0 Java Written by David Erickson at Stanford in 2010, Beacon is one of the most widely cited OpenFlow controllers and served as the basis of Floodlight.

Flowvisor 1.0 C Special purpose controller that acts as transparent proxy for multiple controllers and enables rich network slicing.

Floodlight 1.0 Java Open source core of the commercial controller product made by Big Switch Networks, forked from Beacon but without OSGI.

Trema 1.0 C and Ruby Formerly known as Helios, this controller came from research efforts at NEC.

Ryu 1.0, 1.2, and 1.3 Python Started by NTT Labs, Ryu is one of the more complete and easy to integrate OpenFlow

controllers with open source today.

Pyretic 1.0, 1.2, and

1.3 Python Pyretic is one member of the Frenetic family of SDN programming languages.

Scott Shenker

Page 71: Software defined networking(sdn) vahid sadri

Default Controller In the Mininet is

“OVSC”Openflow Virtual Switch Controller

Page 72: Software defined networking(sdn) vahid sadri

• Choose Controller in Mininethttp://sdnhub.org/tutorials/ryu/

$ sudo mn --topo single,3 --controller remote --switch ovsk

Ovsk ( Open vSwitch in Kernel ) = support for both OpenFlow ver 1.0 and 1.3

--controller remote Run Local Controller 127.0.0.1

--controller=remote=192.168.1.200,port=6633

Controller = Default Controller “OVSC”

$ sudo ovs-vsctl set bridge s1 protocols=OpenFlow13 Force a switch to support OpenFlow 1.3

Page 73: Software defined networking(sdn) vahid sadri

• How to run RYU & link to Mininet

sudo mn --topo single,3 --mac --controller remote --switch ovskmininet@mininet:~$

در شبکه یک کنترللر mininetساخت یک از استفاده Remoteو*** Creating network*** Adding controllerUnable to contact the remote controller at 127.0.0.1:6633*** Adding hosts:h1 h2 h3*** Adding switches:s1*** Adding links:(h1, s1) (h2, s1) (h3, s1)*** Configuring hostsh1 h2 h3*** Starting controller*** Starting 1 switchess1*** Starting CLI:mininet>

نکردیم اجرا ما را کنترللری هیچ اینکه .Mininetبدلیل دهد تشخیص را کنترللری است نتوانستهکنترللر به نیست قادر گوید می به Remoteو .Mininetرا کند اضافه

Page 74: Software defined networking(sdn) vahid sadri

بیاریم در اجرا به را کنترلر یک ما باید پسبرنامه • از استفاده با اینکار دیگر Puttyبرای ارتباط .SSHیک میزنیم لینوکس به•. کنیم می اجرا را نظر مورد کنترلرر سپس

• Run RYU Controller

mininet@mininet:~$ryu-manager --verbose ryu/app/simple_switch.py mininet@mininet:~$ Cd ryu

OpenFlow 1.0

Page 75: Software defined networking(sdn) vahid sadri

• Upgrade Ubuntu Open vSwitch 1.4 to 2.3 using packages in Mininet VM

1 Remove old Open vSwtich (1.4):

sudo apt-get remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch

Download the new Open vSwtich source tarball:2mkdir openvswitchcd openvswitchwget http://openvswitch.org/releases/openvswitch-2.3.0.tar.gztar zxvf openvswitch-2.3.0.tar.gzcd openvswitch-2.3.0

ovs-vswitchd –versionovs-vswitchd (Open vSwitch) 1.4.0+build0

Page 76: Software defined networking(sdn) vahid sadri

• Upgrade Ubuntu Open vSwitch 1.4 to 2.3 using packages in Mininet VM

3

4

Install all the dependencies that will be needed:sudo apt-get updatesudo apt-get -y install build-essential fakeroot debhelper autoconf automake libssl-dev pkg-config bzip2 openssl python-all procps python-qt4 python-zopeinterface python-twisted-conch

Build the Debian packages:

DEB_BUILD_OPTIONS='parallel=2 nocheck' fakeroot debian/rules binary

Install the packages:5cd ..sudo dpkg -i openvswitch-common*.deb openvswitch-datapath-dkms*.deb openvswitch-controller*.deb openvswitch-pki*.deb openvswitch-switch*.deb

Page 77: Software defined networking(sdn) vahid sadri

• Upgrade Ubuntu Open vSwitch 1.4 to 2.3 using packages in Mininet VM

6 Open vSwitch Controller from starting automatically on boot:

sudo /etc/init.d/openvswitch-controller stopsudo update-rc.d openvswitch-controller disablesudo /etc/init.d/openvswitch-switch start

ovs-vswitchd –version

ovs-vswitchd (Open vSwitch) 2.3.0

Page 78: Software defined networking(sdn) vahid sadri

Bookmarks

Page 79: Software defined networking(sdn) vahid sadri

Repository

A software repository is a storage location from which software packages may be retrieved and installed on a computer.

نرم افزاری یک بر مخزن سپس و کرده دریافت مخزن آن از را نرم افزارها می توانند کاربران که جاییست ،کنند نصب خود کامپیوتر ها روی افزار نرم آپدیت آخرین به تا کنیم می آپدیت را مخزن این معموال ما. باشیم داشته دسترسی

More information (Click Here)

Back to Previous Slide

Page 80: Software defined networking(sdn) vahid sadri

Putty.exe

PuTTY is a free implementation of Telnet and SSH for Windows and Unix platforms, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham.

رایگان( Puttyپوتی ) افزار نرم مجموعه یک محیط SSH Client/Serverنام با windowsدر که باشد میهای پروتکل طریق از توانید می آن از .SSHو Raw ،Rloginاستفاده شوید   متصل لینوکس سرور یک به

Download Link

Back to Previous Slide

Page 81: Software defined networking(sdn) vahid sadri

UbuntuUbuntu is an open source software platform that runs everywhere from the smartphone, the tablet and the PC to the server and the cloud.

توزیع( Ubuntu: انگلیسیبه ) اوبونتو توزیع لینوکسیک مبنای بر که با دبیاناست اما شده است؛ پایه گذاری . مفاهیم از یکی از اوبونتو نام دارد تفاوت جنوبی آن » آفریقای معنی دیگران به به نسبت «.انسانیت

Ubuntu Site

Back to Previous Slide

Ubuntu 14.10 Desktop

Page 82: Software defined networking(sdn) vahid sadri

Wireshark

Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education.

Wireshark آنالیزگریک . یک است شبکه در پکت پکت شوند آنالیزگر می وبدل رد شبکه در که هایی پکت ، . دهد می نمایش را آن جزئیات امکان صورت در و دهد می قرار پردازش مورد را آنها و انداخته دام به را

قرار برسی مورد و انداخته دام به را گذرد می کابل طریق از که را آنچه دقیق طور به افزار نرم این واقع در. دهد می

Wireshark Site

Back to Previous Slide

Page 83: Software defined networking(sdn) vahid sadri

SDN_tutorial_VM_32bit

Back to Previous Slide

•SDN Controllers: OpenDaylight, RYU, Floodlight, POX, and  Pyretic

•Example code for a hub, L2 learning switch, and other applications

•Open vSwitch 2.1.0 with support for Openflow 1.2, 1.3 and 1.4

•Mininet to create and run example topologies

•Wireshark 1.11.3 with native support for OpenFlow parsing

•X11 Display

•Firefox

•JDK, Eclipse, and Maven

Page 84: Software defined networking(sdn) vahid sadri

با تشکر از حضور سبزتانوحید صدری