Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://lvk.cs.msu.su/~sveta/SDN_OpenFlow_controllers_lecture2.pdf
Äàòà èçìåíåíèÿ: Tue Oct 13 19:47:34 2015
Äàòà èíäåêñèðîâàíèÿ: Sat Apr 9 22:40:10 2016
Êîäèðîâêà:
SDN&NFV: SDN/OpenFlow
. ..-.., ..., ..
ashalimov@lvk.cs.msu.su @alex_shali @arccnnews


0: SDN/OpenFlow

. ..

2


SDN/OpenFlow?
SDN = Software Defined Networking
· · · · . . .

.
· (OPEX) · (CAPEX) ·

...
. ..

"SDN means thinking differently about networking"
3


SDN/OpenFlow
A B

A -> B
A

B · (OF_PACKET_IN). · ( ). · OpenFlow + (OF_PACKET_OUT/FLOW_MOD).
. .. 4


SDN/OpenFlow
A B

A

B · (OF_PACKET_IN). · ( ). · OpenFlow + (OF_PACKET_OUT/FLOW_MOD). · .
. .. 5


I: OpenFlow

. ..

6


OpenFlow
· , TCP/IP , · -. · (, , ) · API .
. .. 7


OpenFlow
·
­ Nox, Pox, MUL, Ruy, Beacon, OpenDaylight, Floodlight, Maestro, McNettle, Flower, Runos ­ Python Haskell, Erlang

· - Pox. ·
­ ONOS (Stanford) ­ OpenDayLight (Cisco)

· ­ Runos
­ arccn.github.io/runos
. .. 8


OpenFlow
, , , , , , NAT, ARP, DNS, DHCP, BGP

, , web





·
­
· events per second
· >10M · ""

­
· us

·
­ 24/7

·
­ : ­


(2013)
· · · · · · · · · NOX-Classic NOX Beacon Floodlight SNAC Ryu POX Maestro Trema

· · · · · · · · ·

Helios FlowER MUL McNettle NodeFlow Onix SOX Kandoo Jaxon

· Cisco ONE controller · Nicira NVP Controller · Big Network Controller · IBM Programmable Network Controller · HP SDN Controller · NEC Programmable Flow

11



·
­ ­

·
­

·
­

·
­ OpenFlow
12




5/30/2013

13


(2013)

· 7 000 000 . · 50 75 . · :
­ ­ (DC >10M fps)


II: OpenFlow

. ..

15



:
· OpenFlow :
­ ; ­ .

· OpenFlow :
­ , OS Linux; ­ ; ­ .


: In-kernel
Linux [2]
·
­ ­

·
­ ­ ­ ""
[2] P. Ivashchenko, A. Shalimov, R. Smeliansky "High performance in-kernel SDN/OpenFlow controller", Proceedings of the 2014 Open Networking Summit Research Track, USENIX, March 3-5, 2014 Santa Clara, USA


(kernel)

· 30M fps · 45us


RUNOS ­ OpenFlow
+: - -: -


NOX, Pox, Floodlight, OpenDaylight, MUL, etc

OpenFlow

User space Kernel space



?




Inkernel

OpenFlow
OpenFlow +: - -:

: · - userspace · +: - () +: - ·


RUNOS
Easy RUNOS
OpenFlow

Fusion RUNOS
OpenFlow

User space Kernel space

In-kernel RUNOS
OpenFlow

NOX, POX, Floodlight, OpenDaylight, OpenMUL Easy

Fusion +

In-kernel



+



· [] · REST [] · (, Pyretic, Maple)


REST

. ..

22


NorthBound API
· NorthBound API ­ · OpenFlow !
­ (routing, access control) ­ ­ ­

·

. ..

23


OpenFlow

. ..

24


Possible problems in OpenFlow controllers
Example of the problem with running several apps independently: · Forwarding and Span apps. First app sends a flow over port 1, while second ones sends the same flow over port 5. Rules intersect with each other. · Final rules order in the flow table is unknown. · Packets will go using only the first rule. Thus, only one app will work. Conflict! · We may to resolve such conflicts and some others. Just ip_src:10.0.0.1 -> output:1,5!

Forwarding

SPAN

Rule 1: ip_src:10.0.0.1 -> output:1 Rule 2: ip_src:10.0.0.1 -> output:5

OpenFlow

Flow table
Rule 1 Rule 2

New packet

ip_dst:10.0.0.1 never used



· ( , Pyretic)
­ ­ (forwarding couting) ­ ­ (firewall, switch)

. ..

26


· Pyretic
­ (match(dstip=2.2.2.8) >> fwd(1)) + (match(dstip=2.2.2.9) >> fwd(2))
. .. 27


Pyretic LB

· http://frenetic-lang.org /publications/pyretic-login13.pdf
. .. 28


III: Runos

. ..

29


RUNOS
RUNOS = RUssian Network Operating System

·
­ "Could an OpenFlow controller be both easy to develop applications for and also high performance?" ­ , ­
Arista 7050T-52 NEC PF5240F Extreme X460-24p OpenvSwitch 1.6 Brocade Huawei OpenFlow OF1.0 OF1.0, OF1.3 OF1.0, OF1.3 OF1.0, OF1.3 OF 1.3 OF 1.3


RUNOS:
· ,


User ­ OpenFlow space , . Kernel space ­ Features: ( - Algorithmic policies (rule generation) ).

· RUNOS :
­ , ­ ­

-

-

Client-friendly API using EDSL grammar (low level details are hidden inside the runtime ­ overloading, templates) Modules composition (parallel and sequential composition)



Config (json): "controller ": { "threads": 4 }, "loader ": { "threads": 3 }, "link discovery ": { "poll-interval" : 10, "pin-to-thread" : 2 }, "learning switch": { } ...

·
­ ­

·
­ (poll-interval) ­ (pin-to-thread, ownthread)



: C++11, QT, Boost (asio, proto, graph : · libfluid project (_base, _msg)
­ OpenFlow 1.3

· libtins
­ OpenFlow

· glog (google log)
­ ,

· tcmalloc (google performance tools)
­ malloc/free

· json11
­

· boost graph
­ ,


EasyWay
· :



0.5 · · · · · Rest API ( Floodlight) · WebUI ( , , ) · · · ARP



0.6 - ( ) · . OpenFlow. , , . · . . · -- ( ). · . · .



· http://arccn.github.io/runos/
­ Apache, version 2.0

· Tutorial (Readme.md)
­ , ,

·
­ ­ OpenFlow

·
­ Google group runos-ofc



· Algorithmic policies (rule generation)
­ Arrangement of priorities of rules, combining of rules ­ LOAD, MATCH, READ abstractions ­ MAPLE based

· Client-friendly API using EDSL grammar (low level details are hidden inside the runtime ­ overloading, templates)
­ ­ ­ ­ ­ "pkt[eth src] == eth addr " "if (ethsrc == A || ethdst == B) doA else doB" "test((eth_src & "ff0.....0") == "....")" "modify(ip_dst >> "10.0.0.1")" decision are "unicast()", "broadcast()", "drop()"

· Application composition (parallel and sequential composition)
­ dpi + (lb >> forwarding)




· : 10 . · : 55


Open Source
· OpenSource :
­ : "Free as in Freedom" ­ ,
· , · advanced (eg, Runos) · community (, )

· (*): Apache, BSD GPL, Eclipse, , · :
­ (eg, runos-ng) ­ ( R&D)
* http://www.slideshare.net/gerasiov/license-44646637


IV: Runos

. ..

41


First application ­ L2 learning
A
A | B | ...

1

2

3

B
B | A | ...

4 Host A

L2 learning table Switch:port 1:1 3:2

· What is L2 learning?
­ L2 table ­ where particularly host resides (host <->sw:port)

B

· A->B. What should we do on sw1?
­ Learn and broadcast

· B->A. What should we do on sw3?
­ Learn and unicast

· Advanced question: will it work for ping utilities? Ping 10.0.0.2 (assuming B has this IP)
­ Yes, arp (broadcast), ip (icmp)


Host Databases

.insert(...)


L2 forwarding application


Runos
·
­ Runos ­ Mininet

·

. ..

45


V:

. ..

46


(High Availability, HA)
· 365/24/7. · . · ­ , . · : , , , , , .
, %
99,999 99,99 99,9 99


5 52 8,7 3,7










/1
Active/Standby (Passive) : · [ ] · [ ] · [ ]


RUNOS : · OpenFlow 1.0 · . · ·

+ -




/2

· Active/Active
­ ­

· [ , ] · [ ] ·


OpenFlow
· OpenFlow 1.2:
­ ­ ­ : Master, Slave, Equal ­ : Equal . ­ : OFPT_ROLE_REQUEST ­ : .
OpenFlow 1.0, 1.1

OpenFlow 1.2 ­ 1.5



: 1. ? 2. ? 3. ? 4. ? 5. ?



: · . · , Master . · .

: · Master .


1:
In-memory [MASTER] Network View 1 In-memory [SLAVE] Network View 1 In-memory [SLAVE] Network View 1







... Add Flow Add Node

... Add Flow Add Node

... Add Flow Add Node

Proposer Acceptor

Acceptor

Acceptor



Network 1

Network 2

Network 3

· · ·

Multi-Paxos : Network View, ( NV), .


2:

· Master-:
­ , .

· :
.

· :
.


3: · · : · . · : .


3:
1. CID. , CID. . .

2.

3.

4.


4:

?

?

?

1.

2.
3.

4.

5.

Master. . , . Master- . Master- .


5:
: · . · [ , packetin , CPU, ] · .
: , : 1. 2. . 3. .


5:
· : , Master. , , , , . · : .


5:

· :
­ ­ ­ P

· , P. · :
­ , Master- .


5: · :
­ . ­ .

· : , . · :
­ .


Quiz 2
·

. ..

64



· OpenFlow Tutorial
­

· Runos
­ arccn.github.io/runos

http://arccn.ru/

ashalimov@lvk.cs.msu.su
. ..

@alex_shali @arccnnews
65