7 The Genius project provides generic network interfaces, utilities and
8 services. Any OpenDaylight application can use these to achieve
9 interference-free co-existence with other applications using Genius.
11 Modules and Interfaces
12 ----------------------
14 In the first phase delivered in OpenDaylight Boron release, Genius
15 provides following modules —
17 - Modules providing a common view of network interfaces for different
20 - **Interface (logical port) Manager**
22 - *Allows bindings/registration of multiple services to logical
25 - *Ability to plug in different types of southbound protocol
28 - **Overlay Tunnel Manager**
30 - *Creates and maintains overlay tunnels between configured
31 Tunnel Endpoints (TEPs)*
33 - Modules providing commonly used functions as shared services to avoid
34 duplication of code and waste of resources
36 - **Liveness Monitor**
38 - *Provides tunnel/nexthop liveness monitoring services*
42 - *Generates persistent unique integer IDs*
46 - *Provides common generic APIs for interaction with MD-SAL*
48 Interface Manager Operations
49 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54 The YANG file Data Model
55 `odl-interface.yang <https://github.com/opendaylight/genius/blob/master/interfacemanager/interfacemanager-api/src/main/yang/odl-interface.yang>`__
56 contains the interface configuration data-model.
58 You can create interfaces at the MD-SAL Data Node Path
59 **/config/if:interfaces/interface**, with the following attributes —
61 ***Common attributes***
63 - **name** — unique interface name, can be any unique string (e.g.,
66 - **type** — interface type, currently supported *iana-if-type:l2vlan
67 and iana-if-type:tunnel*
69 - **enabled** — admin status, possible values *true* or *false*
71 - **parent-refs** : used to specify references to parent interface/port
72 feeding to this interface
74 - datapath-node-identifier — identifier for a fixed/physical dataplane
75 node, can be physical switch identifier
77 - parent-interface — can be a physical switch port (in conjunction of
78 above), virtual switch port (e.g., neutron port) or another interface
80 - list node-identifier — identifier of the dependant underlying
81 configuration protocol
83 - *topology-id* — can be ovsdb configuration protocol
85 - *node-id* — can be hwvtep node-id
87 ***Type specific attributes***
91 - **vlan-id** — VLAN id for trunk-member l2vlan interfaces
93 - **l2vlan-mode** — currently supported ones are *transparent*,
94 *trunk* or *trunk-member*
96 - when type = stacked\_vlan (Not supported yet)
98 - **stacked-vlan-id** — VLAN-Id for additional/second VLAN tag
102 - **tunnel-interface-type** — tunnel type, currently supported ones
109 - tunnel-type-mpls-over-gre
111 - **tunnel-source** — tunnel source IP address
113 - **tunnel-destination** — tunnel destination IP address
115 - **tunnel-gateway** — gateway IP address
117 - **monitor-enabled** — tunnel monitoring enable control
119 - **monitor-interval** — tunnel monitoring interval in millisiconds
121 - when type = mpls (Not supported yet)
123 - **list labelStack** — list of lables
125 - **num-labels** — number of lables configured
127 Supported REST calls are **GET, PUT, DELETE, POST**
129 Creating L2 port interfaces
130 '''''''''''''''''''''''''''
132 Interfaces on normal L2 ports (e.g. Neutron tap ports) are created with
133 type *l2vlan* and *l2vlan-mode* as *transparent*. This type of interface
134 classifies packets passing through a particular L2 (OpenFlow) port. In
135 dataplane, packets belonging to this interface are classified by
136 matching in-port against the of-port-id assigned to the base port as
137 specified in parent-interface.
139 **URL:** /restconf/config/ietf-interfaces:interfaces
148 "name": "4158408c-942b-487c-9a03-0b603c39d3dd",
149 "type": "iana-if-type:l2vlan", <--- interface type 'l2vlan' for normal L2 port
150 "odl-interface:l2vlan-mode": "transparent", <--- 'transparent' VLAN port mode allows any (tagged, untagged) ethernet packet
151 "odl-interface:parent-interface": "tap4158408c-94", <--- port-name as it appears on southbound interface
157 Creating VLAN interfaces
158 ^^^^^^^^^^^^^^^^^^^^^^^^
160 A VLAN interface is created as a *l2vlan* interface in *trunk-member*
161 mode, by configuring a VLAN-Id and a particular L2 (vlan trunk)
162 interface. Parent VLAN trunk interface is created in the same way as the
163 *transparent* interface as specified above. A *trunk-member* interface
164 defines a flow on a particular L2 port and having a particular VLAN tag.
165 On ingress, after classification the VLAN tag is popped out and
166 corresponding unique dataplane-id is associated with the packet, before
167 delivering the packet to service processing. When a service module
168 delivers the packet to this interface for egress, it pushes
169 corresponding VLAN tag and sends the packet out of the parent L2 port.
171 **URL:** /restconf/config/ietf-interfaces:interfaces
180 "name": "4158408c-942b-487c-9a03-0b603c39d3dd:100",
181 "type": "iana-if-type:l2vlan",
182 "odl-interface:l2vlan-mode": "trunk-member", <--- for 'trunk-member', flow is classified with particular vlan-id on an l2 port
183 "odl-interface:parent-interface": "4158408c-942b-487c-9a03-0b603c39d3dd", <--- Parent 'trunk' iterface name
184 "odl-interface:vlan-id": "100",
190 Creating Overlay Tunnel Interfaces
191 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193 An overlay tunnel interface is created with type *tunnel* and particular
194 *tunnel-interface-type*. Tunnel interfaces are created on a particular
195 data plane node (virtual switches) with a pair of (local, remote) IP
196 addresses. Currently supported tunnel interface types are VxLAN, GRE and
199 **URL:** /restconf/config/ietf-interfaces:interfaces
208 "name": "MGRE_TUNNEL:1",
209 "type": "iana-if-type:tunnel",
210 "odl-interface:tunnel-interface-type": "odl-interface:tunnel-type-mpls-over-gre",
211 "odl-interface:datapath-node-identifier": 156613701272907,
212 "odl-interface:tunnel-source": "11.0.0.43",
213 "odl-interface:tunnel-destination": "11.0.0.66",
214 "odl-interface:monitor-enabled": false,
215 "odl-interface:monitor-interval": 10000,
221 Binding services on interface
222 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
225 `odl-interface-service-bindings.yang <https://github.com/opendaylight/genius/blob/stable/boron/interfacemanager/interfacemanager-api/src/main/yang/odl-interface-service-bindings.yang>`__
226 contains the service binding configuration data model.
228 An application can bind services to a particular interface by
229 configuring MD-SAL data node at path /config/interface-service-binding.
230 Binding services on interface allows particular service to pull traffic
231 arriving on that interface depending upon the service priority.
232 Service modules can specify openflow-rules to be applied on the packet
233 belonging to the interface. Usually these rules include sending the
234 packet to specific service table/pipeline. Service modules are
235 responsible for sending the packet back (if not consumed) to service
236 dispatcher table, for next service to process the packet.
238 **URL:**/restconf/config/interface-service-bindings:service-bindings/
244 "service-bindings": {
247 "interface-name": "4152de47-29eb-4e95-8727-2939ac03ef84",
250 "service-name": "ELAN",
251 "service-type": "interface-service-bindings:service-type-flow-based"
252 "service-priority": 3,
254 "flow-cookie": 134479872,
265 "metadata": 83953188864,
266 "metadata-mask": 1099494850560
272 "service-name": "L3VPN",
273 "service-type": "interface-service-bindings:service-type-flow-based"
274 "service-priority": 2,
276 "flow-cookie": 134217729,
288 "metadata-mask": 4294967295
298 Interface Manager RPCs
299 ~~~~~~~~~~~~~~~~~~~~~~
301 In addition to the above defined configuration interfaces, Interface
302 Manager also provides several RPCs to access interface operational data
303 and other helpful information. Interface Manger RPCs are defined in
304 `odl-interface-rpc.yang <https://github.com/opendaylight/genius/blob/stable/boron/interfacemanager/interfacemanager-api/src/main/yang/odl-interface-rpc.yang>`__
306 The following RPCs are available —
308 get-dpid-from-interface
309 ^^^^^^^^^^^^^^^^^^^^^^^
311 This RPC is used to retrieve dpid/switch hosting the root port from
312 given interface name.
316 rpc get-dpid-from-interface {
317 description "used to retrieve dpid from interface name";
330 get-port-from-interface
331 ^^^^^^^^^^^^^^^^^^^^^^^
333 This RPC is used to retrieve south bound port attributes from the
338 rpc get-port-from-interface {
339 description "used to retrieve south bound port attributes from the interface name";
358 get-egress-actions-for-interface
359 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
361 This RPC is used to retrieve group actions to use from interface name.
365 rpc get-egress-actions-for-interface {
366 description "used to retrieve group actions to use from interface name";
373 description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc.";
379 uses action:action-list;
383 get-egress-instructions-for-interface
384 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
386 This RPC is used to retrieve flow instructions to use from interface
391 rpc get-egress-instructions-for-interface {
392 description "used to retrieve flow instructions to use from interface name";
399 description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc.";
405 uses offlow:instruction-list;
409 get-endpoint-ip-for-dpn
410 ^^^^^^^^^^^^^^^^^^^^^^^
412 This RPC is used to get the local ip of the tunnel/trunk interface on a
413 particular DPN (Data Plane Node).
417 rpc get-endpoint-ip-for-dpn {
418 description "to get the local ip of the tunnel/trunk interface";
425 leaf-list local-ips {
426 type inet:ip-address;
434 This RPC is used to get the type of the interface (vlan/vxlan or gre).
438 rpc get-interface-type {
439 description "to get the type of the interface (vlan/vxlan or gre)";
446 leaf interface-type {
448 base if:interface-type;
457 This RPC is used to get the type of the tunnel interface(vxlan or gre).
461 rpc get-tunnel-type {
462 description "to get the type of the tunnel interface (vxlan or gre)";
471 base odlif:tunnel-type-base;
477 get-nodeconnector-id-from-interface
478 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
480 This RPC is used to get node-connector-id associated with an interface.
484 rpc get-nodeconnector-id-from-interface {
485 description "to get nodeconnector id associated with an interface";
492 leaf nodeconnector-id {
493 type inv:node-connector-id;
498 get-interface-from-if-index
499 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
501 This RPC is used to get interface associated with an if-index (dataplane
506 rpc get-interface-from-if-index {
507 description "to get interface associated with an if-index";
514 leaf interface-name {
520 create-terminating-service-actions
521 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
523 This RPC is used to create the tunnel termination service table entries.
527 rpc create-terminating-service-actions {
528 description "create the ingress terminating service table entries";
536 leaf interface-name {
539 uses offlow:instruction-list;
543 remove-terminating-service-actions
544 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
546 This RPC is used to remove the tunnel termination service table entries.
550 rpc remove-terminating-service-actions {
551 description "remove the ingress terminating service table entries";
556 leaf interface-name {