To simulate Centralized Routing using OMNeT++, which encompasses setting up a network in which routing decisions are created by a central controller instead of being distributed across individual routers. Centralized routing is generally seen in Software Defined Networks (SDNs), in which a central controller handles the network’s routing tables and updates them dynamically according to the network’s needs.
To replicate Centralized Routing, we can model an SDN (Software Defined Network) within OMNeT++ utilizing the INET framework. These framework offers the essential components to execute an SDN with a central controller, which manages routing decisions. phdprime.com will provide you the best Centralized Routing Projects Using OMNeT++ simulation guidance so stay in touch with us we will help you better.
Below is a step-by-step instruction to mimic Centralized Routing projects within OMNeT++:
Steps to Simulate Centralized Routing Projects in OMNeT++
Step 1: Install OMNeT++ and INET Framework
Make sure that OMNeT++ and the INET framework are installed on the machine. The INET framework contains modules for SDN simulation, like OpenFlow switches and controllers that are necessary for replicating centralized routing.
- Download OMNeT++: OMNeT++ official website
- Download INET Framework: INET Framework
Step 2: Define the Network Topology in the NED File
We require to describe a network, which contains an SDN controller, switches, and hosts. The controller will be handled the routing tables for all the switches, creating it a centralized routing architecture.
Here’s an example NED file for an SDN topology:
network CentralizedRoutingNetwork
{
submodules:
controller: SDNController {
@display(“p=200,100”);
}
switch1: OpenFlowSwitch {
@display(“p=100,300”);
}
switch2: OpenFlowSwitch {
@display(“p=300,300”);
}
host1: StandardHost {
@display(“p=50,500”);
}
host2: StandardHost {
@display(“p=350,500”);
}
connections:
host1.ethg++ <–> Eth100M <–> switch1.ethg++;
host2.ethg++ <–> Eth100M <–> switch2.ethg++;
switch1.ethg++ <–> Eth100M <–> switch2.ethg++;
switch1.controllerOut++ <–> Eth100M <–> controller.controllerIn++;
switch2.controllerOut++ <–> Eth100M <–> controller.controllerIn++;
}
In this topology:
- controller denotes the central SDN controller that will manage all routing decisions.
- switch1 and switch2 are OpenFlow switches, which communicate with the controller.
- host1 and host2 are the end devices that communicate through the SDN switches.
- The connections among the switches and the controller are permit the controller to program the switches’ flow tables for centralized routing.
Step 3: Enable SDN Controller and OpenFlow in the INET Framework
To replicate centralized routing, we want to set up the SDN controller and OpenFlow switches in the omnetpp.ini file. The controller will be installed flow entries on the switches to command the routing paths.
Step 3.1: Assign IP Addresses to Hosts and Switches
Allocate an IP addresses to the hosts in the network for communication.
[Config CentralizedRoutingSimulation]
network = CentralizedRoutingNetwork
sim-time-limit = 100s
# Assign IP addresses to hosts
*.host1.ipv4.config = “manual”
*.host1.ipv4.addresses = “10.0.0.1/24”
*.host2.ipv4.config = “manual”
*.host2.ipv4.addresses = “10.0.0.2/24”
# Switches are Layer 2, so no IP configuration is needed for them
Step 3.2: Configure the SDN Controller
Set up the SDN controller to handle the switches using OpenFlow. The controller will be installed flow entries on the switches, commanding how packets are forwarded.
# Configure SDN controller settings
*.controller.numFlows = 2 # The controller will manage two flows (host1 -> host2 and host2 -> host1)
*.controller.flowTable[0].srcAddress = “10.0.0.1” # Flow for host1 -> host2
*.controller.flowTable[0].destAddress = “10.0.0.2”
*.controller.flowTable[1].srcAddress = “10.0.0.2” # Flow for host2 -> host1
*.controller.flowTable[1].destAddress = “10.0.0.1”
The controller will program flow tables on the OpenFlow switches according to the flows are described within the controller’s configuration.
Step 3.3: Enable OpenFlow on the Switches
Allow OpenFlow functionality on the switches thus they can be communicated with the controller and forward packets rely on the controller’s instructions.
# Enable OpenFlow on switches
*.switch1.hasOpenFlow = true
*.switch2.hasOpenFlow = true
Step 4: Simulate Traffic Between Hosts
When the SDN controller and OpenFlow switches are set up then mimic traffic among host1 and host2 to monitor how the centralized controller manages the routing.
# Simulate UDP traffic from host1 to host2
*.host1.numApps = 1
*.host1.app[0].typename = “UdpBasicApp”
*.host1.app[0].localAddress = “10.0.0.1”
*.host1.app[0].connectAddress = “10.0.0.2”
*.host1.app[0].sendInterval = 1s
*.host1.app[0].messageLength = 512B
*.host1.app[0].startTime = 10s
# Configure host2 to receive UDP traffic
*.host2.numApps = 1
*.host2.app[0].typename = “UdpSinkApp”
In this setup:
- host1 generates UDP traffic and transmits it to host2.
- host2 performs as a sink and receives the traffic.
- The SDN controller installs flow entries on switch1 and switch2, allowing them to forward traffic among the two hosts.
Step 5: Run the Simulation
When the network topology then SDN controller, and OpenFlow switches are configure:
- Build and compile the project in OMNeT++.
- We can run the simulation using the OMNeT++ GUI or from the command line.
- Observe centralized routing behavior: Utilize the OMNeT++ GUI to envision how the controller installs flow entries on the switches and how packets are sent depends on the centralized routing logic.
Step 6: Analyze Simulation Results
OMNeT++ makes .sca and .vec files including simulation outcomes. We can analyse numerous key parameters related to centralize routing performance:
- Flow Setup Time: Assess how long it takes for the controller to install flow entries on the switches.
- End-to-End Delay: Examine the delay experienced by packets as they travel via the centrally controlled network.
- Packet Delivery Ratio: Estimate the percentage of packets effectively delivered among the hosts.
- Controller Load: Calculate how much processing is needed by the SDN controller to manage flow installation and network monitoring.
We can be used OMNeT++’s built-in analysis tools to plot and envision these metrics.
Step 7: Experiment with Different Scenarios
We can expand the simulation by testing several configurations and scenarios:
7.1: Add More Switches and Hosts
Extend the network by inserting more switches and hosts, and observe how the centralized controller handles a more complex topology.
submodules:
controller: SDNController;
switch1: OpenFlowSwitch;
switch2: OpenFlowSwitch;
switch3: OpenFlowSwitch; // Add more switches
host1: StandardHost;
host2: StandardHost;
host3: StandardHost; // Add more hosts
connections:
host1.ethg++ <–> Eth100M <–> switch1.ethg++;
host2.ethg++ <–> Eth100M <–> switch2.ethg++;
host3.ethg++ <–> Eth100M <–> switch3.ethg++;
switch1.ethg++ <–> Eth100M <–> switch2.ethg++;
switch2.ethg++ <–> Eth100M <–> switch3.ethg++;
switch1.controllerOut++ <–> Eth100M <–> controller.controllerIn++;
switch2.controllerOut++ <–> Eth100M <–> controller.controllerIn++;
switch3.controllerOut++ <–> Eth100M <–> controller.controllerIn++;
7.2: Simulate Network Failures
Replicate network link failures and monitor how the SDN controller reprograms the switches to route around the failure.
# Simulate a link failure among switch1 and switch2 at 50 seconds
*.switch1.interfaceTable[0].downAt = 50s
7.3: Measure Centralized Routing Overhead
Calculate how much control traffic is made by the SDN controller as it installs flow entries and observes the network.
7.4: Simulate Network Congestion
Maximizes the traffic load among the hosts and then monitor how the centralized routing reacts to congestion.
# Increase traffic load to simulate congestion
*.host1.app[0].sendInterval = 0.1s # Increase message rate
Step 8: Visualize the Routing Process
OMNeT++ offers visualization tools to animate the packet flow and flow installation procedures. It can support to monitor how the SDN controller handles routing decisions and flow updates in real-time.
Summary of Steps:
- Install OMNeT++ and INET Framework: Make certain the simulation environment is ready.
- Define Network Topology: Make a network with an SDN controller, switches, and hosts.
- Configure SDN Controller and OpenFlow Switches: Configure centralized routing using the controller to handle the switches.
- Simulate Traffic: Generate UDP traffic among the hosts.
- Run the Simulation: Monitor centralized routing behaviour and controller actions.
- Analyze Results: Assess routing performance, flow setup time, and packet delivery.
- Extend the Simulation: Test with network failures, larger networks, and distinct traffic loads.
- Visualize Routing: Utilize OMNeT++’s tools to monitor the centralized routing process.
Above basic methodology explained with instance code for Centralized routing projects, was simulated and visualized through OMNeT++. Also we provided summary of this projects. More information to be included in upcoming manual.