Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Overlays (L2 over L3)

Overlays are the technologies used to build logical networks on top of physical networks. The nodes in the overlay network are thought to be connected with logical links, perhaps through many physical links, in the underlying network.

Virtual Extensible LAN (VXLAN) is a network virtualization technology that attempts to ameliorate the scalability problems associated with large cloud computing deployments. It uses a VLAN-like encapsulation technique to encapsulate MAC-based OSI layer 2 Ethernet frames within layer 4 UDP packets.

Network Virtualization using Generic Routing Encapsulation is a network virtualization technology that attempts to alleviate the scalability problems associated with large cloud computing deployments. It uses Generic Routing Encapsulation (GRE) to tunnel layer 2 packets over layer 3 networks.

Overlay OpEN API

This document provides a brief description of the Overlay OpEN API. The Overlay OpEN API allows processes outside of the ICOS main process (switchdrvr) to access the following Overlay services:

All 'Set' operations may affect the Switch behavior and configuration.

Example C Application - tunnel_example

Initialization

In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application is command driven application which then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.

l2ol3tunnel_example.c is a sample application that demonstrates the use of the Overlay OpEN API's. This application (tunnel_example) can be built using OpEN ADK and loaded on to the switch. It is started from command line. It has the following usage syntax:

Usage: ./tunnel_example -o <option> -g -d -c <config flags>=""> -t <tenant> -y <tunnel type>=""> -v <vlanId> -s <srcIP> -r <remoteIP> -u <tunnel id>=""> -i <access id>=""> -h
Look for more detailed information, use help: ./tunnel_example -h

Example With Sample Output (XGS5 platform)

A typical usage is to create a VXLAN on the switch to connect local hosts on switch interfaces 1/10 and 1/20 which are in VLAN 100 to the hosts behind the remote TEP 10.10.10.1.

Pre-Configuration Required on the switch:

Switch is configured with VLAN 100 with interfaces 1/10 and 1/20 as members. It has routing configuration done to ensure the remote TEP 10.10.10.1 is reachable. A loopback interface is configured with 100.100.100.1 IP address which can used as the local VXLAN gateway.

Following steps (with sample outputs) create a tenant with access ports on interfaces 1/10 and 1/20 and VXLAN tunnel to a remote TEP 10.10.10.1.



Clean Up

DCVPN CLI/Overlay API Cross Reference

CLI Command OpEN API Reference
DCVPN Definitions -
(Config)#
[no] vxlan enable
[no] nvgre enable
openapiL2oL3SwitchTunnelModeGet()
openapiL2oL3SwitchTunnelModeSet()
(Config)#
[no] vxlan udp-dst-port <udp-port-number>
openapiL2oL3SwitchVxlanUdpDestPortGet()
openapiL2oL3SwitchVxlanUdpDestPortSet()
(Config)#
vxlan <vnid> vlan <vlan-id>
nvgre <vsid> vlan <vlan-id>
no vxlan <vnid> vlan
no nvgre <vsid> vlan
openapiL2oL3TenantGet()
openapiL2oL3TenantCreate()
openapiL2oL3TenantDelete()
(Config)#
vxlan <vnid> source-ip <ipaddr>
nvgre <vsid> source-ip <ipaddr>
no vxlan <vnid> source-ip
no nvgre <vsid> source-ip
openapiL2oL3TenantGet()
openapiL2oL3TenantCreate()
openapiL2oL3TenantDelete()
(Config)#
[no] vxlan <vnid> vtep <ipaddr>
[no] nvgre <vsid> nve <ipaddr>
openapiL2oL3TunnelGet()
openapiL2oL3TunnelCreate()
openapiL2oL3TunnelDelete()
(Config)#
[no] vxlan <vnid> vtep <ipaddr> tenant-system <mac-addr>
[no] nvgre <vsid> nve <ipaddr> tenant-system <mac-addr>
openapiL2oL3TunnelGet()
openapiL2oL3TunnelCreate()
openapiL2oL3TenantL2FwdEntryGet()
openapiL2oL3TenantL2FwdEntryAdd()
openapiL2oL3TenantL2FwdEntryDelete()
(Interface x/y)#
[no] vxlan <vnid> tenant-system <mac-addr>
[no] nvgre <vsid> tenant-system <mac-addr>
openapiL2oL3AccessPortNextGet()
openapiL2oL3TenantL2FwdEntryGet()
openapiL2oL3TenantL2FwdEntryAdd()
openapiL2oL3TenantL2FwdEntryDelete()
DCVPN Informational Display -
(Routing)#
show vxlan
show nvgre
openapiL2oL3SwitchTunnelModeGet()
openapiL2oL3SwitchVxlanUdpDestPortGet()
openapiL2oL3ResourceLimitsGet()
openapiL2oL3ResourceStatsGet()
openapiL2oL3TenantNextGet()
openapiL2oL3AccessPortNextGet()
openapiL2oL3TunnelNextGet()
(Routing)#
show vxlan <vnid>
show nvgre <vsid>
openapiL2oL3TenantGet()
openapiL2oL3AccessPortNextGet()
openapiL2oL3TunnelNextGet()
(Routing)#
show vxlan <vnid> vtep
show nvgre <vsid> nve>
openapiL2oL3TunnelNextGet()
(Routing)#
show vxlan <vnid> vtep <ipaddr>
show nvgre <vsid> nve <ipaddr>
openapiL2oL3TunnelGet()
(Routing)#
show vxlan <vnid> vtep <ipaddr> tenant-systems
show nvgre <vsid> nve <ipaddr> tenant-systems
openapiL2oL3TunnelGet()
openapiL2oL3TenantL2FwdEntryNextGet()
(Routing)#
show vxlan <vnid> tenant-systems
show nvgre <vsid> tenant-systems
openapiL2oL3TunnelGet()
openapiL2oL3TenantL2FwdEntryNextGet()
openapiL2oL3AccessPortGet()
(Routing)#
show vxlan <vnid> tenant-systems <mac-addr>
show nvgre <vsid> tenant-systems <mac-addr>
openapiL2oL3TenantL2FwdEntryGet()
(Routing)#
show vxlan tenant-systems
show nvgre tenant-systems
openapiL2oL3ResourceLimitsGet()
openapiL2oL3ResourceStatsGet()
openapiL2oL3TenantL2FwdEntryNextGet()
openapiL2oL3TunnelGet()
openapiL2oL3AccessPortGet()
(Routing)#
show vxlan tenant-systems local
show nvgre tenant-systems local
openapiL2oL3TenantL2FwdEntryNextGet()
openapiL2oL3AccessPortGet()
(Routing)#
show vxlan tenant-systems remote
show nvgre tenant-systems remote
openapiL2oL3TenantL2FwdEntryNextGet()
openapiL2oL3TunnelGet()
Clear Tunnel Statistics -
(Routing)#
clear counters vxlan
clear counters nvgre
openapiL2oL3TunnelCounterClear()