Preserving_Flow_Table_Integrity_in_OpenFlow_Networ
Preserving_Flow_Table_Integrity_in_OpenFlow_Networ
Research Article
Keywords: Blockchain, Flow Table Integrity, FTISCON, OpenFlow, Software-De ned Networking
DOI: https://doi.org/10.21203/rs.3.rs-3254673/v1
License: This work is licensed under a Creative Commons Attribution 4.0 International License.
Read Full License
Abstract
SDN revolutionises network management by providing a centralised con-
troller that enables flexible and effortless configuration of networks.
However, this flexibility also leads to a vulnerability that enables the
adversary to trick the security system into allowing the installation
of unauthorised flow rules in the switches. Blockchain provides us
with a way to protect against malicious tampering with flow rules
by storing them in the distributed ledger. In this work, we pro-
pose FTISCON, a mechanism to preserve the integrity of the Open-
Flow flow table that utilizes blockchain technology. We employ the
Ethereum Private Blockchain to implement the proof-of-concept and
conduct a comparative analysis of the proposed scheme and exist-
ing related schemes, evaluating their performance in terms of delay,
computation time, transaction cost, and detection rate. The proposed
work is found to perform better in each of these. The study results
suggest that the proposed approach offers a practical and efficient
remedy to prevent flow modification attacks within SDN networks.
1
2 FTISCON
1 Introduction
In today’s interconnected world, computer networks have become indispens-
able, serving a critical role in facilitating communication and information
exchange across the Internet. However, the lack of programmability and flexi-
bility in traditional network architecture often hinders its deployment (Kreutz
et al, 2015). One of the primary drivers for this is the vertical integration of
data and the control plane of traditional networking. The complexity of net-
work elements makes managing these devices expensive and unreliable in case
of frequent network failures. In traditional networking, the responsibility of
managing packets that move through the network is distributed across multi-
ple nodes rather than centralised in one location Alsaeedi et al (2019). These
drawbacks in traditional networks slow down the innovation and evolution of
networking infrastructures. The evolving landscape of applications requires a
network architecture that is adaptable and readily customizable.
Software-Defined Networking represents a novel networking paradigm that
has gained significant attraction due to its programmability by a centralized
controller (see Figure 1). The SDN controller and SDN switches communi-
cate through OpenFlow protocols. The forwarding rules act as a direction for
the incoming traffic. In the OpenFlow protocol, a forwarding device matches
the incoming traffic with the flow rules and takes action as specified in the
matching flow rule.
The adoption of SDN is going to save error-prone manual configuration
by enabling dynamic automation through a central controller, thus improving
network flexibility. These benefits are attracting the use of SDN technology
in Data Center Networks, the Internet of Things (IoT), and Fog Networks
Yazdinejad et al (2020); Barka et al (2021). Due to the dynamic nature of
IoT devices, traditional networks are not suitable for managing IoT networks.
Furthermore, the SDN controller provides enhanced security by providing a
special debugging facility from the central controller.
The flexibility and programmability offered by SDN controllers create a
potential vulnerability where malicious actors can deceive security applica-
tions, leading to the installation of malicious flow rules on OpenFlow switches.
Moreover, the attacker can exploit vulnerabilities in the control plane to mod-
ify or redirect network traffic, leading to security breaches and data leakage.
The controller is the only device that can possibly determine whether a flow
rule has been tampered with. So, the attacker with a rogue controller will try
to tamper with the flow rules in the switches and cause network failure. There-
fore, in this work, we plan to develop robust and effective security mechanisms
to mitigate the impact of flow modification attacks.
As distributed networks are gaining popularity, efforts are being made by
researchers to adopt Blockchain Technology for securing SDN-enabled net-
works. Blockchain is a Distributed Ledger Technology (DLT) with characteris-
tics such as decentralization, immutability, non-reversibility, and peer-to-peer
operation and has been widely adopted in various fields Krishnan et al (2022);
Wang et al (2022); Roy et al (2021); Misra et al (2020a). Blockchain has been
FTISCON 3
effectively used in the field of IoT to preserve the privacy of IoT devices and
data-sharing schemes Ferrag et al (2019). In the healthcare sector, researchers
are utilising blockchain to preserve the privacy of patients and maintain
electronic medical records (EMR) in the block.
The concept behind blockchain is to record the transaction history in a
chain of blocks across its peer-to-peer network. Blocks are connected in a chain,
with each block containing a hash value that corresponds to the previous block.
Therefore, mutating one block will make the entire chain invalid. Each node
in the network takes a copy of the blockchain and performs a validation of
transactions. Therefore, a consensus is made among the nodes before creating
a new block, which makes it difficult for the eavesdropper to tamper with any
block (once a block has been tampered with, it is visible to all nodes involved
in the consensus). The consensus algorithms tell how the nodes agree to add
the block to the chain. After the nodes have verified the transaction, it is
approved, and the distributed ledger is updated. The updated ledger is then
broadcasted to all nodes on the blockchain, ensuring that every node has an
accurate and current copy of the data (see Figure 2).
Ethereum Smart Contracts are self-executing programs stored on the
blockchain network. It is mainly used to automate the operations in the net-
work Khan et al (2021). The functions are executed when certain conditions
4 FTISCON
are met. Therefore, it is useful for automating the verification of flow rules
on the blockchain without the need for intervention. Furthermore, the decen-
tralised architecture of blockchain technology makes it suitable for the integrity
of SDN flow tables. The immutable nature of blockchain prevents the mali-
cious manipulation of flows by the attacker and makes it potential for SDN
integrity. Therefore, it can be used to strengthen the integrity of SDN and
make it more robust.
This paper presents a scheme called FTISCON to detect flow rule modi-
fication attacks on OpenFlow switches in SDN networks by using Blockchain
Technology. The main contributions of this paper are as follows:
• A Smart Contract (SC) implementation of flow rule verification mecha-
nisms to avoid the malicious manipulation of flows by an attacker.
• A practical implementation of the proposed work using an Ethereum
private blockchain was developed to demonstrate its feasibility.
• A simulation-based experimental performance study of the proposed
method in Mininet.
• A formal and informal analysis of the detection rate, execution time,
transaction cost, delay of the proposed work, and time complexity
comparison in relation to existing techniques.
The rest of this article is organized as follows. Section 2 describes related
works on state-of-the-art SDN security threats and vulnerabilities. In Section
3, we discuss our system model and architecture of the FTISCON in detail. We
also give a detailed description of the design of smart contracts based on the
Ethereum Private Network and the flow verification process. Section 4 presents
FTISCON 5
the experimental result analysis and discussion of the results. The concluding
remarks and future directions are presented in Section 5.
2 Related Work
2.1 OpenFlow Flow Rules
OpenFlow is a networking protocol that enables the separation of control
and forwarding functions within a network. This allows network controllers
to define how traffic should flow through a network of switches that can be
programmed to follow the controller’s policies. It uses a match-action pipeline
to process packets on a switch. The match section of the pipeline compares
incoming packets against a set of criteria or rules, while the action part speci-
fies what to do with packets that match those criteria. OpenFlow rules contain
a set of matching fields, instructions, and counters to measure the number of
matches shown in Figure 3. The action phase of the pipeline involves determin-
ing the appropriate course of action for the packet, which can include directing
it to a designated port, discarding the packet, making alterations to certain
packet header attributes, or forwarding the packet to the controller. Each flow
in the flow table is associated with a counter that keeps a record of the pack-
ets and bytes that correspond to specific rules or criteria in the match-action
pipeline. These counters can help administrators understand which network
applications or devices are using the most bandwidth, which can be helpful for
capacity planning and network optimization.
The flow table becomes vulnerable to security threats such as DoS attacks.
It becomes the target for the attacker in which the adversary tries to break into
OpenFlow switches to install malicious rules. A malicious flow rule can direct
the traffic to an attacker’s node which then captures confidential information
from the received traffic. Klöti et al (2013) performed an analysis from the
security perspective and evaluated the adoption of OpenFlow in SDN. The
study shows that OpenFlow is susceptible to a flow modification attack and
an information disclosure attack.
(BaaS) to verify and insert flow rules on OpenFlow switches, primarily focusing
on implementing a reward scheme for the verifier.
Weichen et al (2021) addressed the problem with a different approach by
introducing a voting scheme to check whether the flow rule has been tampered
with. Krishnamohan et al (2020) introduced BlockFlow and used the concept of
switch version number to detect changes in the forwarding rules. However, their
method is not economically well suited for a large network as the transaction
cost will be higher due to the re-installation of flow rules.
We present a summary of the literature review in Table 1 regarding
the blockchain network used, the deployed domain, and its limitations. In
summary, many works have been proposed in the literature using different
approaches. However, these solutions possess a few pitfalls to satisfy the per-
formance requirements for SDN applications. These solutions further lack
preventive measures after the detection of the attack and deployment of the
actual SDN platform. Therefore, in this work, we try to address these limi-
tations by adopting blockchain to prevent the malicious manipulation of flow
rules by attackers and taking preventive measures to eradicate the attack. This
paper presents a new scheme to address these issues by integrating blockchain
Smart Contracts with SDN to verify malicious flows before installing them on
the forwarding devices through the Blockchain Agent. Then, we compare the
effectiveness of our work with two existing works, BlockFlow Krishnamohan
et al (2020) and BlockSDSec Bose et al (2019) that are closer to our work.
3 Proposed Technique
In this article, we propose a technique that utilized the blockchain smart con-
tract to preserve the integrity of flow rules in the SDN network. The flow rules
are stored on the blockchain. A blockchain agent is introduced to perform the
verification of flow rules through the decentralized blockchain network. Finally,
a detailed performance analysis is carried out in a private blockchain network.
A detailed description of the proposed technique is given below.
3.1 Architecture
The architecture of the proposed model consists of the following modules-
SDN Controller, Blockchain Network, a Smart Contract (SC) and a Blockchain
Agent as depicted in Figure 4. We briefly explain each module below-
a) SDN Controller: The SDN controller maintains the topology informa-
tion, forwarding rules from a central point. The controller can dynamically
adjust the network’s routing policies as the network changes. The con-
troller also communicates with the Blockchain node to store the flow
information through the WEB3 API.
b) Blockchain Network: The Blockchain network consists of multiple
peer-to-peer nodes which participate in the consensus for verification of
OpenFlow rules. The number of Blockchain nodes depends upon the appli-
cation type. The more the number of Blockchain nodes, the better the
FTISCON 9
C SDN Controller
BA Blockchain Agent
Si OpenFlow enabled SDN switch
IPc IP address of SDN Controller
Wc Ethereum Wallet address of SDN Controller
Wba Ethereum Wallet address of Blockchain Agent
ts The time at which the transaction was initiated
src Source MAC
dst Destination MAC
inport Ingress port number
p Priority of the flow rule
dpidi Datapath ID of SDN Switch si
tn id Unique identifier for the transaction
drop Packet is blocked by the controller
outport Packet is transmitted through the given outport
normal Packet is transmitted as traditional Layer 2 convention
fold Flow rule already present on the blockchain
fnew New flow rule request for verification
{a1 , a2 , ..., an } be the action field specified in transaction tni where each
ai = {drop outport normal}.
Let F = {f1 , f2 , ..., fn } be the set of existing flow rules in the net-
work, where fi is the set of match field mi and action field ai i.e. f =
{(m1 , a1 ), (m2 , a2 ), ..., (mn , an )}.
The transaction between SDN and Blockchain can occur in three scenar-
ios: i) During the network components registration ii) During the addition of
new flow rules and iii) During the verification of flow rules. The transaction
formulation for each scenario is described in the following subsection.
The transaction tn(C) and tn(BA) will run only once but tn(si ) will run
for each SDN switch in the network. The SC checks the duplication of the
switch and then stores the si in the SWList.
For the addition of a new flow rule on the blockchain, the BA sends the
transaction as:
Agent periodically collects the flow rules from the switches. For every new
PACKET IN message, the controller will send a copy of the Blockchain net-
work. The algorithm 3 is executed through a Blockchain Network. Therefore,
proof-of-correctness is done through the Consensus algorithm (Proof-of-Work
in our case). The Blockchain nodes reach an agreement by following the con-
sensus algorithm. Once the consensus is successful among the nodes, a new
block is added to the chain containing flow rule information. Subsequently, the
controller will send add flow command to the OpenFlow switch. The Agent
then calls SC function verif yF low(F ) to check the similarity between the
flows installed on the switch and Blockchain. If flow verification fails due to a
flow modification attack, the SC will automatically emit an event to remove
flow from the switch. Figure 5 illustrates the sequence diagram of message
exchange between nodes.
In the following steps, we elaborate on the process of flow rule verification
in detail:
a) Initially our Blockchain Agent collects the OpenFlow rules from the
switches in a certain time interval.
b) When a particular host requests a new flow for communication, the SDN
switch requests a new flow F1.
c) Simultaneously, the controller also transmits a duplicate of the flow rule
to the blockchain, creating a transaction.
d) This transaction is verified by the blockchain nodes and the corresponding
flow rule is stored in the blockchain.
e) Now the SDN Controller sends the flow rules for installation on the switch.
f) The Blockchain Agent initiates the VerifyFlow(F1) on the Blockchain
network.
g) The SC checks for the similarity between the received flow F1 and the
flow present on the blockchain. Once the flow is successfully verified, a
FTISCON 15
positive response is sent back to the BA (This is denoted with the green
line in Figure 5).
h) The modified flow information is sent to the SDN controller attack for
the new flow verification.
i) The BA repeats the steps f and g. Once SC declares that F 1 is invalid,
a negative response is sent back to the BA (Denoted with a red line).
4 Experimental Results
This section describes the experimental setup, smart contract analysis and
evaluation based on the results obtained by the proposed technique.
is modified to 99. Moreover, the matching field can be made blank to modify
the entire table on the switch.
FTISCON 19
Fig. 10: Execution time comparison with respect to the number of Flows.
Fig. 11: Gas Consumption comparison with respect to the number of Flows.
of flows entering the network in a short period of time. Then the SDN con-
troller will experience a high CPU overhead due to the need to process a large
number of flow updates.
22 FTISCON
Fig. 13: Overhead on Controller CPU with an increasing number of Flow Mod
packets.
We also compared the time required for the registration and verification
process of a new flow rule in BlockSDSec, BlockFlow and our proposed method
(see Table 5). The comparison table shows that the existing methods iter-
ate through all the previous transactions before registering the flow on the
blockchain. Similarly, during the verification, the existing methods perform the
matching operation with the existing flow rules. Therefore, the proposed work
is better in terms of time complexity when compared to existing methods for
similar tasks.
24 FTISCON
4.6 Discussion
In this subsection, we discuss the security and effectiveness of FTISCON. The
related study work shows that the SDN network cannot guarantee the complete
integrity and privacy of OpenFlow rules. Some of the works in the literature
use Blockchain Technology to prevent the flow rule modification attack. The
adversary may install false flow rules or modify the existing flow rules present
in the switches. In this work, we have proposed a method to prevent the flow
rule modification attack using Blockchain Technology in which flow rules are
stored on the Blockchain and verified by the Blockchain Agent.
The Blockchain Agent acts as a trusted node that communicates with the
Blockchain nodes and collects flow rules from the switches. In the design of our
model, we keep the SDN controller and Blockchain Agent separate from each
other. This is to protect the verification process from eventual attacks on the
SDN controller. The FTISCON will be able to survive even if the controller
goes offline. Furthermore, the communication overhead on the controller will
be less as the verification process is handled by the Blockchain Agent. This
is one of the advantages of our model. However, if the Blockchain Agent is
compromised, the controller will not be able to do the verification.
Blockchain Technology offers immutability, transparency and integrity of
the data through Smart Contract automation. The changes made to the EVM
state will be recorded in the transaction history. Therefore, it makes it easier
for the system to track down the adversary and isolate the compromised part of
the network. However, the difficulty of making changes in the functionality of
SCs are issue Peng et al (2021). If any error or loophole occurs in the run-time,
it is almost impossible or expensive to correct.
The performance analysis result shows that FTISCON is significantly
better in terms of execution time and transaction cost. This is due to the sepa-
ration of Controller and Agent. The experimental result shows that FTISCON
possesses a reduction in execution time as one of our primary objectives. How-
ever, the SDN controller has to look if any duplicate flows are being stored
on the blockchain and this is done to reduce the unnecessary filling up of
Blockchain storage as well as to reduce transaction cost. Thus making it eco-
nomically acceptable in the real scenario. On the other hand, the BlockFlow
Krishnamohan et al (2020) needs to invoke deleteRule() function multiple
times. This causes the model to pay more gas fees to make these transactions.
The proposed method is deployed and tested in a Private local Blockchain
network to make the transaction processing faster. However, there are vari-
ous other methods of deployment and testing available such as Testnet, and
Mainnet.
The current Ethereum 1.0 platform uses heavyweight Ethash PoW as a
consensus algorithm. Since PoW is based on the ability to compute hashes
per second, it becomes slow with the increasing complexity level. However,
the development of Ethereum 2.0 will make it faster as it will implement the
Proof-of-Stake to validate the transactions where it replaces the miners with
FTISCON 25
validators. Ethereum 2.0 distributes the transaction data within the Ethereum
network which increases the throughput of the network substantially.
5 Conclusion
In this work, we presented FTISCON, a scheme to protect flow rule modifica-
tion attacks on OpenFlow switches in SDN using blockchain and incorporating
an SC implementation for flow rule verification. A proof-of-concept implemen-
tation of the scheme is carried out using Ethereum private blockchain. Informal
analysis based on the attack detection and experimental studies on running
time and transaction cost is presented that validate the potential of FTISCON.
The Performance analysis shows that the proposed method can significantly
reduce the execution time, transaction cost and delay incurred due to the flow
verification compared to BlockFlow and BlockSDSec.
In the future, smart contract design for SDN flow rule verification could be
enhanced by incorporating machine learning techniques. For example, machine
learning algorithms could be used to predict the potential impact of a flow
rule on network traffic.
Acknowledgement
The authors would like to thank the anonymous referees for their constructive
criticism and valuable suggestions. This work is funded by the Ministry of
Electronics and Information Technology, India with project no. 13(15)/2020-
CC&BT dated 21.07.2020
References
Alsaeedi M, Mohamad MM, Al-Roubaiey AA (2019) Toward adaptive and scal-
able openflow-sdn flow control: A survey. IEEE Access 7:107,346–107,379.
https://doi.org/10.1109/ACCESS.2019.2932422
https://doi.org/10.1109/ICNP.2013.6733671
Qiu X, Zhang K, Ren Q (2017) Global flow table: A convincing mechanism for
security operations in sdn. Computer Networks 120:56–70. https://doi.org/
https://doi.org/10.1016/j.comnet.2017.04.002