# SDN-OpenFlow Topology Discovery: An Overview of Performance Issues
## 2 Topology Discovery in SDN Networks
### Link Discovery Protocol  
As we noted in the introduction that there is no standard protocol in SDN networks to discover the links between SDN-Switches, and most of the existing SDN-Controllers use Link Layer Discovery Protocol (LLDP) [33; 38; 39] such as OpenDaylight [19], Floodlight [20], POX [62], Ryu [22], Beacon [24], Cisco Open SDN-Controller [63], and Open Network Operating System (ONOS) [34; 38; 43] to discover these links. LLDP is considered a layer-2 (Data link) protocol that is used by network devices to their identity, capacities, and neighbors' devices on a Local Area Network (LAN) based on IEEE-802. Moreover, each LLDP discovery message is embedded in a layer-2 frame, which is a type of Ethernet and the Data Unit called (LLDPUD) [56]. The data obtained by LLDP is placed into the management information database of the SDN-Switches, which can then be queried while crawling the network's nodes to retrieve the network topology using a network management protocol. At a later stage, the NOX SDN-Controller [21] implemented the LLDP development process to improve the discovery of the link between SDN-Switches and created the first version of the OFPD protocol [64]. OFDP does not depend on a centralized control such as LLDP (i.e., switches send and receive LLDP advertisements autonomously). It is a request-response discovery protocol that can send a Packet-In message to the SDN-Controller to receive the discovery information collected. Nevertheless, OFDP uses the LLDP packet format with few modifications and operates in a slightly different way than LLDP protocol for compatibility with the SDN architecture, where the control logic is central to the SDN-Controller. Therefore, OFDP SDN-Switches do not initiate LLDP advertisements but the SDN-Controller has full control over the link discovery process. Table 1 presents the main differences between LLDP and OFDP protocols. The SDN-Controller initiates the discovery process in OFDP by sending an LLDP discovery announcement encapsulated in a Packet_Out message to the forwarders (parent SDN-Switches) that are directly associated with OpenFlow using a multicast address. When the forwarder device receives the announcement message, it floods all of its ports with \begin{table}
\begin{tabular}{c c c} \hline \hline
**Features** & **LLDP** & **OFDP** \\ \hline Type of Ethernet frame & LLDP’s EtherType = 0 \(\times\) 88 cc & OFDP’s EtherType = 0 \(\times\) 88 cc \\ Destination address of the frame & bridge-filtered multicast MAC & normal multicast MAC (01:23:00: \\  & (01:80:C2:00:00:0E) & 00:00:01) \\ Mode of operation & Advertisement only & Advertisement only \\ What will the SDN-Switches do with & SDN-Switches will not forward LLDP & SDN-Switches will forward OFDP \\ advertisements? & advertisements & advertisements \\ SDN-Switches’ neighbor table & SDN-Switches that support LLDP build a & OpenFlow SDN-Switch does not keep \\  & table for directly connected neighbors & any information about its directly \\  & & connected neighbors \\ How is the topology obtained? & By crawling the neighborhood tables of & By inferring the information from LLDP \\  & SDN-Switches & Packet-In messages \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Similarities and differences between LLDP and OFDP protocols [64]. an LLDP discovery announcement, and the only SDN-Switch that supports OpenFlow updates its OFDP table. To illustrate how OFDP uses LLDP advertisement messages, the LLDP considers a layer 2 frame that consists of a header and a payload [39] as shown in Figure 5. In the header portion of the frame, the Ethertype field is set to 0x88 cc, and the destination MAC address field is set to a multicast address as we discussed in Table 1. The Ethertype field is used by OpenFlow SDN-Switches to distinguish LLDP frames from others. The payload portion is called LLDPDU which is shaded grey. The payload consists of a number of fields with a Type-Length-Value (TLV) structure and ends with the \"End of LLDPDU TLV\" field. Some TLV fields in LLDPDU are mandatory while the others are optional.