How to Simulate XY Routing Projects Using OMNeT++

To simulate an XY routing project using OMNeT++ and the INET framework, follow these steps and basically it is a simple and deterministic routing technique usually utilized in mesh or grid networks such as Network-on-Chip or Wireless Sensor Networks. The simple principle is to route packets first along the X-dimension (horizontal axis) and then along the Y-dimension (vertical axis) until the packet reaches its destination.

For an exquisite experience in simulating XY routing projects with the OMNeT++ tool, seek the expertise of the professionals at phdprime.com. We assure you of unparalleled simulation guidance. Our specialization encompasses both Network-on-Chip and Wireless Sensor Networks, ensuring you receive the finest assistance available.

Here is a procedure to simulate the XY routing in OMNeT++

Steps to Simulate XY Routing Projects in OMNeT++

  1. Install OMNeT++ and INET Framework
  • Download and install OMNeT++ from here.
  • Clone or download the INET framework from INET GitHub repository.
  • INET deliver the simple modules and protocols for networking simulation, however we will required to execute or encompass the XY routing algorithm.
  1. Understand XY Routing
  • XY Routing is a deadlock-free, dimension-order routing algorithm. It transmit packets by first traversing in the X-direction (horizontal) until it aligns with the destination’s X-coordinate, then moves in the Y-direction (vertical) until it reaches the destination.
  • This technique is utilized in mesh networks in which each node has coordinates (X, Y), and packets are forwarded along the grid until they reach their destination.
  1. Create a New Routing Protocol (XY Routing) in INET

While XY Routing is not available by default in INET, we will need to execute it as a custom routing protocol.

Steps to implement:

  • Expand RoutingProtocolBase or IPv4NetworkLayer in the INET framework.
  • The routing logic essential to forward the packet along the X-dimension first and then along the Y-dimension.

Example logic for XY Routing:

void XYRouting::handlePacket(cPacket *packet, L3Address destAddr) {

// Get the current node coordinates (X_current, Y_current)

Coord currentPosition = getNodePosition();

// Get the destination node coordinates (X_dest, Y_dest)

Coord destPosition = getDestinationPosition(destAddr);

if (currentPosition.x != destPosition.x) {

// Route along the X-dimension (horizontal)

if (currentPosition.x < destPosition.x) {

forwardPacketToNeighbor(“East”, packet);

} else {

forwardPacketToNeighbor(“West”, packet);

}

} else if (currentPosition.y != destPosition.y) {

// Route along the Y-dimension (vertical)

if (currentPosition.y < destPosition.y) {

forwardPacketToNeighbor(“North”, packet);

} else {

forwardPacketToNeighbor(“South”, packet);

}

} else {

// If we reached the destination, deliver the packet locally

deliverLocal(packet);

}

}

This basic strategy routes packets along the X-axis until it reaches the appropriate column, then routes along the Y-axis to reach the destination row.

  1. Define a Grid Network Topology (NED File)
  • Describe a 2D grid or mesh network in which each node denote a router or host. The connections among nodes should consider a grid layout in which each node is associated to its immediate neighbors (North, South, East, and West).

Example NED file for a 4×4 grid:

network XYRoutingNetwork {

submodules:

router[16]: StandardHost {

@display(“p=” + (index % 4 * 100) + “,” + (index / 4 * 100));

}

connections allowunconnected:

// Horizontal connections (X-dimension)

router[0].ethg++ <–> Eth10G <–> router[1].ethg++;

router[1].ethg++ <–> Eth10G <–> router[2].ethg++;

router[2].ethg++ <–> Eth10G <–> router[3].ethg++;

router[4].ethg++ <–> Eth10G <–> router[5].ethg++;

router[5].ethg++ <–> Eth10G <–> router[6].ethg++;

router[6].ethg++ <–> Eth10G <–> router[7].ethg++;

router[8].ethg++ <–> Eth10G <–> router[9].ethg++;

router[9].ethg++ <–> Eth10G <–> router[10].ethg++;

router[10].ethg++ <–> Eth10G <–> router[11].ethg++;

router[12].ethg++ <–> Eth10G <–> router[13].ethg++;

router[13].ethg++ <–> Eth10G <–> router[14].ethg++;

router[14].ethg++ <–> Eth10G <–> router[15].ethg++;

// Vertical connections (Y-dimension)

router[0].ethg++ <–> Eth10G <–> router[4].ethg++;

router[1].ethg++ <–> Eth10G <–> router[5].ethg++;

router[2].ethg++ <–> Eth10G <–> router[6].ethg++;

router[3].ethg++ <–> Eth10G <–> router[7].ethg++;

router[4].ethg++ <–> Eth10G <–> router[8].ethg++;

router[5].ethg++ <–> Eth10G <–> router[9].ethg++;

router[6].ethg++ <–> Eth10G <–> router[10].ethg++;

router[7].ethg++ <–> Eth10G <–> router[11].ethg++;

router[8].ethg++ <–> Eth10G <–> router[12].ethg++;

router[9].ethg++ <–> Eth10G <–> router[13].ethg++;

router[10].ethg++ <–> Eth10G <–> router[14].ethg++;

router[11].ethg++ <–> Eth10G <–> router[15].ethg++;

}

This NED file generates a grid network with 16 nodes, in which each node is associated to its neighboring nodes along the X and Y dimensions.

  1. Configure Simulation Parameters in omnetpp.ini
  • In the omnetpp.ini file, set up the routing technique, simulation parameters, traffic generation, and parameters.

Example omnetpp.ini:

network = XYRoutingNetwork

sim-time-limit = 100s

# Enable XY routing protocol for all nodes

**.routingProtocol = “XYRouting”

# Application to generate traffic

**.router[*].numApps = 1

**.router[*].app[0].typename = “UdpBasicApp”

**.router[*].app[0].destAddresses = “router[15]”  # Traffic destined for router[15]

**.router[*].app[0].sendInterval = 0.2s

**.router[*].app[0].messageLength = 1024B

# Record metrics for analysis

**.vector-recording = true

**.scalar-recording = true

This configuration:

  • Sets XYRouting as the routing protocol.
  • Creates UDP traffic from all routers toward the router at position [15].
  • Allow scalar and vector recording for detailed evaluation of the simulation.
  1. Run the Simulation
  • Execute the simulation in OMNeT++ and monitor the performance of the XY routing strategies. We can envision the packet forwarding process, in which each packet first moves along the X-axis and then along the Y-axis to reach its destination.
  1. Analyse Results
  • Utilize OMNeT++’s built-in evaluation tools to accumulate parameters such as:
    • End-to-End Delay: Evaluate on how long it takes for packets to travel from source to destination by XY routing.
    • Packet Delivery Ratio (PDR): Assess on how many packets are successfully delivered to their destination.
    • Path Length: Measure the average number of hops taken by packets using XY routing.

We can utilize OMNeT++’s plove tool to envision the scalar and vector data, or export the data to external tools such as Python for further evaluation.

  1. Extend XY Routing (Optional)
  • We can expand the simple XY routing techniques with additional characteristics like:
    • Fault Tolerance: Adapt the techniques to manage node/link failures and identify the paths.
    • Congestion Awareness: Apply load balancing by enabling the routing protocol to choose other paths when congestion happens beside the optimal XY path.
    • Energy-Aware Routing: For wireless networks, deliberate energy consumption and execute energy-efficient routing approaches.

Throughout the simulation, we deliver the step by step procedures to simulate the XY routing project using the OMNeT++ tool and that helps to manage the routes for packet transmission. We plan to offer more details in further manual regarding the XY routing project.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2