lution has been tested in an emulated OpenFlow-
SDN network using Mininet (Mininet, 2016), the fa-
mous emulator in SDN. On the other hand, it has
been tested using ONetSwitches (Hu et al., 2014), an
all programmable SDN platform. The main chip of
ONetSwitch is the Xilinx Zynq-7045 SoC, which in-
tegrates ARM Cortex-A9 dual core processor-based
processing system (PS) and Kintex-7 FPGA-based
programmable logic (PL) into a single chip. The PS
part makes ONetSwitch software programmable and
the PL part enables the reconstruction of the hardware
logic. The use of the ONetSwitches allowed us to
evaluate the implemented host discovery module in
a wider set of experiments than using just the Mininet
emulator. Moreover, it led us to do a detailed analy-
sis of a part of the OpenFlow standard: the meaning
of the port status fields, which allow the controller to
track the status of each switch port.
The rest of the paper is structured as follows. Sec-
tion 2 describes the basic concepts of OpenFlow stan-
dard. Section 3 describes the non standardized topol-
ogy discovery solution implemented in most of the
OpenFlow-based controllers. Next, section 4 pro-
poses a mechanism to implement the host discovery
functionality, improving the basic topology discovery
of OpenFlow-based controllers. Section 5 describes
the usefulness of the host discovery utility. Finally,
section 6 concludes the paper.
2 SDN OPENFLOW
BACKGROUND
The separation between the infrastructure(forwarding
plane) and the SDN controller (control plane) is done
via standardized southbound interfaces. OpenFlow,
that is promoted by Open Network Foundations, is
the dominant standard providing the SDN southbound
interface between the SDN controller and the SDN
switches. In this paper we consider the OpenFlow
version 1.3 (ONF, 2012), the latest version of Open-
Flow that has support from switch vendors.
After the start-up, the switches and the controller
perform an initial handshake to establish the Open-
Flow connection. Each switch contacts its controller
on the corresponding IP address and TCP port num-
ber and establishes a TCP, which could be encripted
using TLS protocol. The switch and the controller
send a Hello message with the higher OpenFlow ver-
sion supported. Then, if the switch has support for
the OpenFlow version sent by the controller, the con-
troller sends a OFPT_FEATURES_REQUEST mes-
sage to the switch. The switch responds with an
OFPT_FEATURES_REPLY message that includes a
unique switch’s identifier called datapath_id, its ac-
tive ports and the corresponding MAC addresses. Af-
ter that, the OpenFlow connection is established.
This initial handshake informs the controller about
the existence of switches, but not about the inter-
connection of the network elements. To obtain a
picture of the network topology, a topology discov-
ery solution must be implemented. Most of the
well-known SDN controllers implement a similar,
but non-standardized, topology discovery mechanism
that allows the discovery of the links interconnecting
switches. This mechanism is described in the follow-
ing section.
As part of the control plane, the controller could
use the network topology information to solve differ-
ent network management and control tasks. Among
them, a fundamental task is to find out the most appro-
priate paths and configure the switches consequently
to do the forwarding tasks.
An OpenFlow switch consists of one or more flow
tables and a group table. Using OFPT_FLOW_MOD
messages, the controller can add, update and
delete flow entries in flow tables, reactively (in re-
sponse to packets) or proactively. Each flow en-
try consists of a match structure (many fields to
match flows such as input switch port, Ethernet
source/destination address, VLAN ID, VLAN prior-
ity, IP source/destination address,...), a set of counters
and a set of actions. On packet arrival, the packet
is matched with the match fields in a table and, if
any entry matches, the counters in that entry are up-
dated and the associated actions are performed. If
no entry matches, then a table-miss event has oc-
curred. In OpenFlow 1.2 and earlier, every flow ta-
ble has a default table-miss flow entry. However,
in OpenFlow 1.3, the default table-miss flow entry
must be inserted manually by the controller. The ac-
tions associated to a table-miss flow entry may in-
clude dropping the packet, sending the packet to an-
other table, or sending the packet to the controller. In
the last case, a OFPT_PACKET_IN message is sent
from switch to controller, which carries the packet.
When controller receives the OFPT_PACKET_IN
message, it evaluates its contents and decides what
actions will be done over the packet included in the
OFPT_PACKET_IN message. Then, the packet is
returned to the switch in a OFPT_PACKET_OUT,
which carries the packet and a list of actions to be
applied over the packet. Also, the controller could
send an OFPT_FLOW_MOD message to include a
flow entry in switch flow table, in order to process
similar packets in future.