Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
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.
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.
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
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.
# ./tunnel_example -o config -g
ICOS version = 9.19.15.54
Switch supports below overlay types:
VXLAN
NVGRE
# ./tunnel_example -o config -y 2
ICOS version = 9.19.15.54
Overlay Configuration Mode is set to Enable for Tunnel Type=2. rc=OPEN_E_NONE
# ./tunnel_example -o tenant -g
ICOS version = 9.19.15.54
+-------------------------------------------------------------—+
Sl Tenant Tunnel-Type VLAN ID Local TEP
+-------------------------------------------------------------—+
1 1 VXLAN 100 0.0.0.0
+-------------------------------------------------------------—+
# ./tunnel_example -o access -g
ICOS version = 9.19.15.54
---------------------------------------------------------------------—
Tenant Tunnel-Type Access-Handle VLAN intIfNum Match-Type
---------------------------------------------------------------------—
1 VXLAN 8538 100 10 2
1 VXLAN 8539 100 20 2
---------------------------------------------------------------------—
# ./tunnel_example -o tenant -c 2 -t 1 -y 2 -v 100 -s 100.100.100.1
ICOS version = 9.19.15.54
+-------------------------------------------------------------—+
Sl Tenant Tunnel-Type VLAN ID Local TEP
+-------------------------------------------------------------—+
1 1 VXLAN 100 100.100.100.1
+-------------------------------------------------------------—+
# ./tunnel_example -o tunnel -c 1 -t 1 -r 10.10.10.1
ICOS version = 9.19.15.54
Tunnel created, handle 345
# ./tunnel_example -o tunnel -g -u 345
ICOS version = 9.19.15.54
Tunnel Status:
State - UP
Reason - None
Tunnel status get success, rc=OPEN_E_NONE
# ./tunnel_example -o tunnel -g
ICOS version = 9.19.15.54
---------------------------------------------------------------------—
Tenant Tunnel-Type Tunnel-Handle Remote-TEP Status Reason
---------------------------------------------------------------------—
1 VXLAN 345 10.10.10.1 1 0
---------------------------------------------------------------------—
Total Tenant Tunnels = 1
Clean Up
# ./tunnel_example -o stats -u 345 -d
# ./tunnel_example -o l2entry -d -t 1 -m 00-00-00-00-11-aa
# ./tunnel_example -o l2entry -d -t 1 -m 00-00-00-00-11-dd
# ./tunnel_example -o tunnel -d -u 345
# ./tunnel_example -o tenant -d -t 1
# ./tunnel_example -o config -d -y 2
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() |