First complete pass over User Guide
[docs.git] / manuals / user-guide / src / main / asciidoc / sfc / odl-sfc-ovs-user.adoc
1 === SFC-OVS integration
2
3 ==== Overview
4 SFC-OVS provides integration of SFC with Open vSwitch (OVS) devices.
5 Integration is realized through mapping of SFC objects (like SF, SFF,
6 Classifier, etc.) to OVS objects (like Bridge, TerminationPoint=Port/Interface).
7 The mapping takes care of automatic instantiation (setup) of corresponding object
8 whenever its counterpart is created. For example, when a new SFF is created,
9 the SFC-OVS plugin will create a new OVS bridge and when a new OVS Bridge is
10 created, the SFC-OVS plugin will create a new SFF.
11
12 The feature is intended for SFC users willing to use Open vSwitch as underlying
13 network infrastructure for deploying RSPs (Rendered Service Paths).
14
15 ==== SFC-OVS Architecture
16 SFC-OVS uses the OVSDB MD-SAL Southbound API for getting/writing information
17 from/to OVS devices. From the user perspective SFC-OVS acts as a layer between
18 SFC DataStore and OVSDB.
19
20 .SFC-OVS integration into ODL
21 image::sfc/sfc-ovs-architecture-user.png[width=250]
22
23 ==== Configuring SFC-OVS
24 .Configuration steps:
25 . Run ODL distribution (run karaf)
26 . In karaf console execute: +feature:install odl-sfc-ovs+
27 . Configure Open vSwitch to use ODL as a manager, using following command:
28 +ovs-vsctl set-manager tcp:<odl_ip_address>:6640+
29
30 ==== Tutorials
31
32 ===== Verifying mapping from OVS to SFF
33
34 ====== Overview
35 This tutorial shows the usual workflow when OVS configuration is transformed to
36 corresponding SFC objects (in this case SFF).
37
38 ====== Prerequisities
39 * Open vSwitch installed (ovs-vsctl command available in shell)
40 * SFC-OVS feature configured as stated above
41
42 ====== Instructions
43 .In shell execute:
44 . +ovs-vsctl set-manager tcp:<odl_ip_address>:6640+
45 . +ovs-vsctl add-br br1+
46 . +ovs-vsctl add-port br1 testPort+
47
48 ====== Verification
49 .There are two possible ways to verify if SFF was created:
50 a. visit SFC User Interface:
51 +http://<odl_ip_address>:8181/sfc/index.html#/sfc/serviceforwarder+
52 b. use pure RESTCONF and send GET request to URL:
53 +http://<odl_ip_address>:8181/restconf/config/service-function-forwarder:service-function-forwarders+
54
55 There should be SFF, which name will be ending with 'br1' and the SFF should
56 containt two DataPlane locators: 'br1' and 'testPort'.
57
58 ===== Verifying mapping from SFF to OVS
59
60 ====== Overview
61 This tutorial shows the usual workflow during creation of OVS Bridge with use
62 of SFC APIs.
63
64 ====== Prerequisities
65 * Open vSwitch installed (ovs-vsctl command available in shell)
66 * SFC-OVS feature configured as stated above
67
68 ====== Instructions
69 .Steps:
70 . In shell execute: +ovs-vsctl set-manager tcp:<odl_ip_address>:6640+
71 . Send POST request to URL:
72 +http://<odl_ip_address>:8181/restconf/operations/service-function-forwarder-ovs:create-ovs-bridge+
73 Use Basic auth with credentials: "admin", "admin" and set +Content-Type: application/json+.
74 The content of POST request should be following:
75 ----
76 {
77     "input":
78     {
79         "name": "br-test",
80         "ovs-node": {
81             "ip": "<Open_vSwitch_ip_address>"
82         }
83     }
84 }
85 ----
86 Open_vSwitch_ip_address is IP address of machine, where Open vSwitch is installed.
87
88 ====== Verification
89 In shell execute: +ovs-vsctl show+. There should be Bridge with name 'br-test'
90 and one port/interface called 'br-test'.
91
92 Also, corresponding SFF for this OVS Bridge should be configured, which can be
93 verified through SFC User Interface or RESTCONF as stated in previous tutorial.