To implement the Metropolitan Area Networks (MAN) in OMNeT++, we have to cover a large geographic area that is usually a city or big campus by simulating a network which contains different kinds of devices and links like routers, switches, wireless links, and optical fibers. Below is a comprehensive guide to help you get started with implementing a MAN in OMNeT++.
Step-by-Step Implementation:
Example Code Snippets
Here are some example snippets to give you an idea of what the configuration files might look like:
NED File (MANetwork.ned)
package manetwork;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import inet.node.ethernet.EtherSwitch;
network MANetwork {
parameters:
int numCoreRouters = default(2);
int numEdgeRouters = default(4);
int numSwitches = default(6);
int numEndDevices = default(20);
submodules:
coreRouter[numCoreRouters]: Router {
@display(“p=200,200;i=device/router”);
}
edgeRouter[numEdgeRouters]: Router {
@display(“p=400,400;i=device/router”);
}
switch[numSwitches]: EtherSwitch {
@display(“p=600,600;i=device/switch”);
}
endDevice[numEndDevices]: StandardHost {
@display(“p=800,800;i=device/laptop”);
}
connections:
// Connect core routers
for i=0..numCoreRouters-2 {
coreRouter[i].pppg++ <–> coreRouter[i+1].pppg++;
}
// Connect edge routers to core routers
for i=0..numEdgeRouters-1 {
edgeRouter[i].pppg++ <–> coreRouter[i % numCoreRouters].pppg++;
}
// Connect switches to edge routers
for i=0..numSwitches-1 {
switch[i].pppg++ <–> edgeRouter[i % numEdgeRouters].pppg++;
}
// Connect end devices to switches
for i=0..numEndDevices-1 {
endDevice[i].ethg++ <–> switch[i % numSwitches].ethg++;
}
}
INI File (omnetpp.ini)
[General]
network = manetwork.MANetwork
sim-time-limit = 1000s
*.coreRouter*.ppp[*].bitrate = 10Gbps
*.edgeRouter*.ppp[*].bitrate = 1Gbps
*.switch*.eth[*].bitrate = 1Gbps
*.endDevice*.eth[0].bitrate = 100Mbps
*.endDevice*.numApps = 1
*.endDevice*.app[0].typename = “UdpBasicApp”
*.endDevice*.app[0].destAddresses = “endDevice[*]”
*.endDevice*.app[0].destPort = 5000
*.endDevice*.app[0].messageLength = 1000B
*.endDevice*.app[0].sendInterval = exponential(1s)
In the script, we brought the valuable information on how to set up and execute the MAN and from the scratch using OMNeT++. If you want any added details on this topic, we can also provide them. Implementation of Metropolitan Area Networks in OMNeT++we render complete simulation support, we work on simulating a network which contains different kinds of devices and links like routers, switches, wireless links, and optical fibers for your projects, connect with us for good guidance.