# LSSDNF: A Lightweight Secure Software Defined Network Framework for Future Internet in 5G-6G
## 3 Proposed Approach
Step5: In order to accept incoming packets of the same protocol type, the client creates a TCP or UDP window. Step6: Using the client's IP address as a connection point, the server begins transmitting data packets to the client. Step7: In addition to receiving the data packets, the client stores each network characteristic in a separate file, such as bandwidth, jitter, and transfer rate. Step8: For each of the two types of topologies, steps 1 through 6 are repeated three times. Step10: Out of the topologies compared above, pick the best one and obtain its routing data from the SDN controller. Step11: Using Multichain, build a private Blockchain and store the routing data. ```

**Algorithm 2**_Proposed approach: LSSDNF_

## 4 Test System, Assumptions, and Result Analysis

This section provides concrete evidence of how SDN outperforms traditional networks. Here, we tested two distinct network types while controlling the number of devices connected to the network, its bandwidth, and the testing period for each network. ### Simulation Setup

To simulate our network topologies, we used the mininet network emulator. Mininet runs actual kernel, switch, and application code on a single machine to build a realistic virtual network. In this work, we created two topologies using mininet: one with 40 devices, including 30 computers, 9 switches, and 1 SDN controller; the other, with 42 devices, including 30 computers, 9 OpenFlow switches, and 3 SDN controllers. The multi-controller topology serves only to make the single-controller topology crash-protected. For example, in a single-controller topology, everything depends on the controller, and the entire network will also crash if it crashes. Here, we used a multi-controller topology in a master-slave configuration, where one controller is the master and all the others are slaves; if the master crashes, the slave wakes up and begins acting like the master, and our entire network does not crash. The following tools and technologies are used to simulate the networks:

* Mininet and the Pox SDN controller are used to construct the topology that will be evaluated [30; 31]. * iPerf is employed in order to test the network [32]. * For storing routing information, a multichain private blockchain is used [33]. * Smart contracts are created using the Solidity programming language. For evaluating the behavior of the smart contract under various circumstances, the Mocha testing framework is used. * Ganache-cli for creating a test wallet and blockchain for testing [34]. * Truffle HD Wallet Provider for connecting our smart contract to the user's Metamask wallet in the web3 framework using Remix IDE [34; 35]. The parameters used to measure the network performance are given in Tables 2-4. The description of the test network is as follows:

* **In the case of TCP**: With a network connection established between the two end devices and a TCP bandwidth restriction of 26 Mbps, data packets were transferred from device 1 to device 2 to test the network. * **In the case of UDP**: Set the bandwidth restriction to 2 Mbps, and send several UDP data packets from one end device to another end device. * **Routing Information**--Using the Multichain blockchain development platform, a private blockchain is created and put the routing data (IP, MAC, etc.) to the controller in the multichain. Figures 3 and 4 display the state of smart contracts that have been deployed and the cost of transactions on the Ethereum blockchain. The transaction cost in this instance is 589,671 gas, as can be observed. Therefore, creating a private blockchain in the SDN would be economical. With the aid of the Multi-chain blockchain development platform, a private blockchain for network security was created. By uploading our networking routes and controller information to the blockchain, followed by regular checks to see if the network routes have changed or not, the network is made more secure by performing security checks.