9 The Genius project provides generic network interfaces, utilities and
10 services. Any OpenDaylight application can use these to achieve
11 interference-free co-existence with other applications using Genius.
13 Modules and Interfaces
14 ----------------------
16 In the first phase delivered in OpenDaylight Boron release, Genius
17 provides following modules —
19 - Modules providing a common view of network interfaces for different
22 - **Interface (logical port) Manager**
24 - *Allows bindings/registration of multiple services to logical
27 - *Ability to plug in different types of southbound protocol
30 - **Overlay Tunnel Manager**
32 - *Creates and maintains overlay tunnels between configured
33 Tunnel Endpoints (TEPs)*
35 - Modules providing commonly used functions as shared services to avoid
36 duplication of code and waste of resources
38 - **Liveness Monitor**
40 - *Provides tunnel/nexthop liveness monitoring services*
44 - *Generates persistent unique integer IDs*
48 - *Provides common generic APIs for interaction with MD-SAL*
50 Interface Manager Operations
51 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 The YANG file Data Model
57 `odl-interface.yang <https://github.com/opendaylight/genius/blob/master/interfacemanager/interfacemanager-api/src/main/yang/odl-interface.yang>`__
58 contains the interface configuration data-model.
60 You can create interfaces at the MD-SAL Data Node Path
61 **/config/if:interfaces/interface**, with the following attributes —
63 ***Common attributes***
65 - **name** — unique interface name, can be any unique string (e.g.,
68 - **type** — interface type, currently supported *iana-if-type:l2vlan
69 and iana-if-type:tunnel*
71 - **enabled** — admin status, possible values *true* or *false*
73 - **parent-refs** : used to specify references to parent interface/port
74 feeding to this interface
76 - datapath-node-identifier — identifier for a fixed/physical dataplane
77 node, can be physical switch identifier
79 - parent-interface — can be a physical switch port (in conjunction of
80 above), virtual switch port (e.g., neutron port) or another interface
82 - list node-identifier — identifier of the dependant underlying
83 configuration protocol
85 - *topology-id* — can be ovsdb configuration protocol
87 - *node-id* — can be hwvtep node-id
89 ***Type specific attributes***
93 - **vlan-id** — VLAN id for trunk-member l2vlan interfaces
95 - **l2vlan-mode** — currently supported ones are *transparent*,
96 *trunk* or *trunk-member*
98 - when type = stacked\_vlan (Not supported yet)
100 - **stacked-vlan-id** — VLAN-Id for additional/second VLAN tag
104 - **tunnel-interface-type** — tunnel type, currently supported ones
111 - tunnel-type-mpls-over-gre
113 - **tunnel-source** — tunnel source IP address
115 - **tunnel-destination** — tunnel destination IP address
117 - **tunnel-gateway** — gateway IP address
119 - **monitor-enabled** — tunnel monitoring enable control
121 - **monitor-interval** — tunnel monitoring interval in millisiconds
123 - when type = mpls (Not supported yet)
125 - **list labelStack** — list of lables
127 - **num-labels** — number of lables configured
129 Supported REST calls are **GET, PUT, DELETE, POST**
131 Creating L2 port interfaces
132 '''''''''''''''''''''''''''
134 Interfaces on normal L2 ports (e.g. Neutron tap ports) are created with
135 type *l2vlan* and *l2vlan-mode* as *transparent*. This type of interface
136 classifies packets passing through a particular L2 (OpenFlow) port. In
137 dataplane, packets belonging to this interface are classified by
138 matching in-port against the of-port-id assigned to the base port as
139 specified in parent-interface.
141 **URL:** /restconf/config/ietf-interfaces:interfaces
150 "name": "4158408c-942b-487c-9a03-0b603c39d3dd",
151 "type": "iana-if-type:l2vlan", <--- interface type 'l2vlan' for normal L2 port
152 "odl-interface:l2vlan-mode": "transparent", <--- 'transparent' VLAN port mode allows any (tagged, untagged) ethernet packet
153 "odl-interface:parent-interface": "tap4158408c-94", <--- port-name as it appears on southbound interface
159 Creating VLAN interfaces
160 ^^^^^^^^^^^^^^^^^^^^^^^^
162 A VLAN interface is created as a *l2vlan* interface in *trunk-member*
163 mode, by configuring a VLAN-Id and a particular L2 (vlan trunk)
164 interface. Parent VLAN trunk interface is created in the same way as the
165 *transparent* interface as specified above. A *trunk-member* interface
166 defines a flow on a particular L2 port and having a particular VLAN tag.
167 On ingress, after classification the VLAN tag is popped out and
168 corresponding unique dataplane-id is associated with the packet, before
169 delivering the packet to service processing. When a service module
170 delivers the packet to this interface for egress, it pushes
171 corresponding VLAN tag and sends the packet out of the parent L2 port.
173 **URL:** /restconf/config/ietf-interfaces:interfaces
182 "name": "4158408c-942b-487c-9a03-0b603c39d3dd:100",
183 "type": "iana-if-type:l2vlan",
184 "odl-interface:l2vlan-mode": "trunk-member", <--- for 'trunk-member', flow is classified with particular vlan-id on an l2 port
185 "odl-interface:parent-interface": "4158408c-942b-487c-9a03-0b603c39d3dd", <--- Parent 'trunk' iterface name
186 "odl-interface:vlan-id": "100",
192 Creating Overlay Tunnel Interfaces
193 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
195 An overlay tunnel interface is created with type *tunnel* and particular
196 *tunnel-interface-type*. Tunnel interfaces are created on a particular
197 data plane node (virtual switches) with a pair of (local, remote) IP
198 addresses. Currently supported tunnel interface types are VxLAN, GRE and
201 **URL:** /restconf/config/ietf-interfaces:interfaces
210 "name": "MGRE_TUNNEL:1",
211 "type": "iana-if-type:tunnel",
212 "odl-interface:tunnel-interface-type": "odl-interface:tunnel-type-mpls-over-gre",
213 "odl-interface:datapath-node-identifier": 156613701272907,
214 "odl-interface:tunnel-source": "11.0.0.43",
215 "odl-interface:tunnel-destination": "11.0.0.66",
216 "odl-interface:monitor-enabled": false,
217 "odl-interface:monitor-interval": 10000,
223 .. _genius-user-guide-binding-services:
225 Binding services on interface
226 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
229 `odl-interface-service-bindings.yang <https://github.com/opendaylight/genius/blob/stable/boron/interfacemanager/interfacemanager-api/src/main/yang/odl-interface-service-bindings.yang>`__
230 contains the service binding configuration data model.
232 An application can bind services to a particular interface by
233 configuring MD-SAL data node at path /config/interface-service-binding.
234 Binding services on interface allows particular service to pull traffic
235 arriving on that interface depending upon the service priority.
236 Service modules can specify openflow-rules to be applied on the packet
237 belonging to the interface. Usually these rules include sending the
238 packet to specific service table/pipeline. Service modules are
239 responsible for sending the packet back (if not consumed) to service
240 dispatcher table, for next service to process the packet.
242 **URL:**/restconf/config/interface-service-bindings:service-bindings/
248 "service-bindings": {
251 "interface-name": "4152de47-29eb-4e95-8727-2939ac03ef84",
254 "service-name": "ELAN",
255 "service-type": "interface-service-bindings:service-type-flow-based"
256 "service-priority": 3,
258 "flow-cookie": 134479872,
269 "metadata": 83953188864,
270 "metadata-mask": 1099494850560
276 "service-name": "L3VPN",
277 "service-type": "interface-service-bindings:service-type-flow-based"
278 "service-priority": 2,
280 "flow-cookie": 134217729,
292 "metadata-mask": 4294967295
302 Interface Manager RPCs
303 ~~~~~~~~~~~~~~~~~~~~~~
305 In addition to the above defined configuration interfaces, Interface
306 Manager also provides several RPCs to access interface operational data
307 and other helpful information. Interface Manger RPCs are defined in
308 `odl-interface-rpc.yang <https://github.com/opendaylight/genius/blob/stable/boron/interfacemanager/interfacemanager-api/src/main/yang/odl-interface-rpc.yang>`__
310 The following RPCs are available —
312 get-dpid-from-interface
313 ^^^^^^^^^^^^^^^^^^^^^^^
315 This RPC is used to retrieve dpid/switch hosting the root port from
316 given interface name.
320 rpc get-dpid-from-interface {
321 description "used to retrieve dpid from interface name";
334 get-port-from-interface
335 ^^^^^^^^^^^^^^^^^^^^^^^
337 This RPC is used to retrieve south bound port attributes from the
342 rpc get-port-from-interface {
343 description "used to retrieve south bound port attributes from the interface name";
362 get-egress-actions-for-interface
363 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
365 This RPC is used to retrieve group actions to use from interface name.
369 rpc get-egress-actions-for-interface {
370 description "used to retrieve group actions to use from interface name";
377 description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc.";
383 uses action:action-list;
387 get-egress-instructions-for-interface
388 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
390 This RPC is used to retrieve flow instructions to use from interface
395 rpc get-egress-instructions-for-interface {
396 description "used to retrieve flow instructions to use from interface name";
403 description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc.";
409 uses offlow:instruction-list;
413 get-endpoint-ip-for-dpn
414 ^^^^^^^^^^^^^^^^^^^^^^^
416 This RPC is used to get the local ip of the tunnel/trunk interface on a
417 particular DPN (Data Plane Node).
421 rpc get-endpoint-ip-for-dpn {
422 description "to get the local ip of the tunnel/trunk interface";
429 leaf-list local-ips {
430 type inet:ip-address;
438 This RPC is used to get the type of the interface (vlan/vxlan or gre).
442 rpc get-interface-type {
443 description "to get the type of the interface (vlan/vxlan or gre)";
450 leaf interface-type {
452 base if:interface-type;
461 This RPC is used to get the type of the tunnel interface(vxlan or gre).
465 rpc get-tunnel-type {
466 description "to get the type of the tunnel interface (vxlan or gre)";
475 base odlif:tunnel-type-base;
481 get-nodeconnector-id-from-interface
482 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
484 This RPC is used to get node-connector-id associated with an interface.
488 rpc get-nodeconnector-id-from-interface {
489 description "to get nodeconnector id associated with an interface";
496 leaf nodeconnector-id {
497 type inv:node-connector-id;
502 get-interface-from-if-index
503 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
505 This RPC is used to get interface associated with an if-index (dataplane
510 rpc get-interface-from-if-index {
511 description "to get interface associated with an if-index";
518 leaf interface-name {
524 create-terminating-service-actions
525 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
527 This RPC is used to create the tunnel termination service table entries.
531 rpc create-terminating-service-actions {
532 description "create the ingress terminating service table entries";
540 leaf interface-name {
543 uses offlow:instruction-list;
547 remove-terminating-service-actions
548 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
550 This RPC is used to remove the tunnel termination service table entries.
554 rpc remove-terminating-service-actions {
555 description "remove the ingress terminating service table entries";
560 leaf interface-name {