How to Start Benes Network Routing Projects Using OMNeT++

To start Benes network routing in OMNeT++ which is an extremely associated multistage interconnection network that generally utilised to interact within parallel computing systems and telecommunication switches. Routing encompasses to discover the optimal paths via numerous stages whereas reducing contention in a Benes network.

We follow these steps to execute and replicate the Benes network routing using OMNeT++:

Steps to Start Benes Network Routing Project in OMNeT++

  1. Understand Benes Network and Its Routing

Key Features of Benes Network

  • Structure:
    • A Benes network contains log⁡2(n)\log_2(n)log2​(n)-stage switches in which nnn is the volume of input/output nodes.
    • Overall, it has 2n−22n – 22n−2 switches.
    • It offers unique paths among any input-output pair.
  • Routing:
    • It utilises the recursive divide-and-conquer methods.
    • Make sure that contention-free routing for one-to-one interactions.

Applications

  • Multiprocessor systems.
  • Data center networking.
  • High-speed switching fabrics.
  1. Set Up the Environment

Install OMNeT++

  1. We should download and install OMNeT++ environment on the system.
  2. Confirm the installation by executing example projects.

Optional: Install INET Framework

  • INET framework offers further networking utilities, which can be provided more complex simulations as required.
  • Construct INET:

make makefiles

make

  1. Plan the Benes Network Topology

Example for an 8-Port Benes Network

  • Input and output nodes are associated through intermediate switches.
  • Every single switch links to two upstream and two downstream nodes.

Define Objectives

  • For the Benes network, we execute the routing logic.
  • Mimic traffic patterns and examine:
    • Network contention.
    • Routing efficiency.
    • Path utilization.
  1. Create a New OMNeT++ Project
  1. Go to OMNeT++ IDE.
  2. Select File > New > OMNeT++ Project.
  3. Name it to the project like BenesNetworkRouting and choose Finish.
  1. Define the Benes Network Topology

Create a .ned File

Make a multi-stage interconnection topology using .ned file.

Example:

network BenesNetwork {

parameters:

int n = 8; // Number of inputs/outputs

submodules:

input[n]: StandardHost {

@display(“i=device/pc”);

}

output[n]: StandardHost {

@display(“i=device/pc”);

}

stage[2 * (int(log2(n)) – 1)][n/2]: Router {

@display(“i=device/router”);

}

connections allowunconnected:

// Connect inputs to the first stage

for i=0..n/2-1 {

input[2*i].pppg++ –> stage[0][i].pppg++;

input[2*i+1].pppg++ –> stage[0][i].pppg++;

}

// Connect intermediate stages

for s=0..2*(int(log2(n))-2), i=0..n/2-1 {

stage[s][i].pppg++ –> stage[s+1][i].pppg++;

stage[s][i].pppg++ –> stage[s+1][i+1].pppg++;

}

// Connect the last stage to outputs

for i=0..n/2-1 {

stage[2*(int(log2(n))-2)][i].pppg++ –> output[2*i].pppg++;

stage[2*(int(log2(n))-2)][i].pppg++ –> output[2*i+1].pppg++;

}

}

  1. Implement Routing Logic

Create a Custom Routing Module

Execute the routing logic for switches within .cc file as BenesRouting.cc.

Example: Recursive Routing in Benes Network

#include <omnetpp.h>

#include <vector>

using namespace omnetpp;

class BenesRouting : public cSimpleModule {

private:

int stage, index; // Stage and index of the switch

int totalStages;

protected:

virtual void initialize() override {

stage = par(“stage”);

index = par(“index”);

totalStages = par(“totalStages”);

}

virtual void handleMessage(cMessage *msg) override {

auto packet = check_and_cast<cMessage *>(msg);

int dest = packet->par(“dest”);

// Determine next stage based on destination

int nextPort = routeToNextStage(dest);

send(packet, “out”, nextPort);

}

int routeToNextStage(int dest) {

// Example: Simple recursive routing decision

int midStage = totalStages / 2;

if (stage < midStage) {

return (dest / (1 << (midStage – stage))) % 2; // Upper or lower port

} else {

return (dest / (1 << (stage – midStage))) % 2; // Reverse routing

}

}

};

Define_Module(BenesRouting);

  1. Configure Simulation

Edit omnetpp.ini

Set the simulation metrics.

Example:

[Config BenesNetworkSimulation]

network = BenesNetwork

*.input[*].numApps = 1

*.input[*].app[0].typename = “UdpApp”

*.input[*].app[0].destAddresses = “output[uniform(0, 7)]”

*.input[*].app[0].messageLength = 512B

*.stage[*][*].stage = ${stage}

*.stage[*][*].totalStages = ${2 * (int(log2(8)) – 1)}

simulation.timeLimit = 100s

  1. Run the Simulation
  1. In OMNeT++, execute the simulation to utilise Tkenv (GUI) or Cmdenv (command-line).
  2. Monitor:
    • Packet flow and contention points.
    • Routing via Benes network stages.
  1. Analyze Results

Metrics to Evaluate

  • Path Utilization:
    • Estimate the volume of packets to pass through each path.
  • Contention Points:
    • Detect blockages within heavily utilised switches.
  • Delivery Ratio:
    • Assess the rate of packets that are effectively distributed.

Visualization

  • Monitor packet routing via network using OMNeT++ visualization tools.
  • Transfer records into external tools like MATLAB, Python, or Excel for advanced analysis.
  1. Extend and Optimize

Dynamic Scenarios

  • Launch dynamic traffic patterns or failures.
  • Experiment the network in diverse loads.

Advanced Features

  • Execute the non-blocking routing for numerous input-output pairs.
  • Integrate priority-based routing, managing the needs of QoS.

Comparison

  • We need to equate the Benes network routing including other multistage network topologies such as Clos or Fat-Tree.

The outlined structure is accomplished by OMNeT++-specific content such as simulation configuration, implementation, and analysis with code snippets for replicating Benes Network Routing projects. Feel free to inquire for more details on this project. To initiate your Benes Network Routing Projects utilizing OMNeT++, we at phdprojects.org are committed to providing you with exceptional guidance and customized topics aligned with your areas of interest. Please feel free to contact us, and we will offer you the best assistance