Hi Irene
Thanks for looking into the code.
Bellow is the code of NED file, configuration and routing files. I
must also add that I've used the version of INETMANET as I wanted a
multi-interface wireless node.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
NED
File :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
import inet.nodes.wireless.WirelessAP;
import inet.nodes.wireless.WirelessHost;
import inet.nodes.inet.Router;
import inet.examples.ethernet.lans.cable;
import inet.nodes.wireless.WirelessAPWithEth;
import inet.transport.sctp.SCTP;
import inet.applications.sctpapp.SCTPApp;
import inet.nodes.inet.StandardHost;
import ned.DatarateChannel;
import inet.nodes.wireless.WirelessHostSimplified;
import inet.linklayer.ieee80211.Ieee80211NicSTA;
import inet.world.ChannelControl;
import inet.linklayer.radio.Radio;
import inet.nodes.wireless.WirelessHostMultiRadio;
import inet.world.ChannelControlExtended;
import inet.mobility.LinearMobility;
import inet.nodes.wireless.WirelessRouter;
//
// TODO auto-generated module
//
network Scenario
{
//@display("b=600,200,rect");
parameters:
bool testing = default(false);
bool logverbose = default(false);
types:
channel AP_Rt_con extends DatarateChannel
{
delay = 10ms;
// datarate = 10 Mbps;
}
channel Rt_Rt_con extends DatarateChannel
{
delay = 100ms;
datarate = 5 Mbps;
}
channel Rt_Host_con extends DatarateChannel
{
delay = 10ms;
datarate = 10 Mbps;
}
submodules:
R1d: Router {
@display("p=25,150");
routingFile = "R1d.mrt";
}
R2d: Router {
@display("p=225,150");
routingFile = "R2d.mrt";
}
R3d: Router {
@display("p=425,150");
routingFile = "R3d.mrt";
}
R4d: Router {
@display("p=625,150");
routingFile = "R4d.mrt";
}
Dst: StandardHost {
@display("p=86,75");
routingFile = "Dst.mrt";
IPForward = false;
}
channelControl: ChannelControlExtended {
@display("p=25,18");
coreDebug = false;
playgroundSizeX = 650;
playgroundSizeY = 400;
numChannels = 5;
}
Src: myWirelessHost {
@display("p=30,272");
numRadios = 4;
routingFile = "Src.mrt";
IPForward = false;
}
R1s: WirelessRouter {
@display("p=24,200");
routingFile = "R1s.mrt";
mgmtType = default("Ieee80211MgmtAP");
}
R2s: WirelessRouter {
@display("p=225,200");
routingFile = "R2s.mrt";
mgmtType = default("Ieee80211MgmtAP");
}
R3s: WirelessRouter {
@display("p=425,200");
routingFile = "R3s.mrt";
mgmtType = default("Ieee80211MgmtAP");
}
R4s: WirelessRouter {
@display("p=625,200");
routingFile = "R4s.mrt";
mgmtType = default("Ieee80211MgmtAP");
}
connections:
//Router to Router Connections
//R1S.pppg++ <--> Rt_Rt_con <--> R1d.pppg++;
R1s.pppg++ <--> Rt_Rt_con <--> R1d.pppg++;
R2s.pppg++ <--> Rt_Rt_con <--> R2d.pppg++;
R3s.pppg++ <--> Rt_Rt_con <--> R3d.pppg++;
R4s.pppg++ <--> Rt_Rt_con <--> R4d.pppg++;
//R1d.ethg++ <--> Rt_Host_con <--> Dst.ethg++;
R1d.pppg++ <--> Rt_Host_con <--> Dst.pppg++;
R2d.pppg++ <--> Rt_Host_con <--> Dst.pppg++;
R3d.pppg++ <--> Rt_Host_con <--> Dst.pppg++;
R4d.pppg++ <--> Rt_Host_con <--> Dst.pppg++;
}
module myWirelessHost extends WirelessHostMultiRadio
{
parameters:
int numSctpApps = default(0);
string sctpAppType = default("n/a");
@display("i=old/laptop3");
gates:
submodules:
sctp: SCTP {
@display("p=459,132;i=block/wheelbarrow");
}
sctpApp[numSctpApps]: <sctpAppType> like SCTPApp {
@display("p=459,51");
}
connections allowunconnected:
for i=0..numSctpApps-1 {
sctpApp[i].sctpOut --> sctp.from_appl++;
sctp.to_appl++ --> sctpApp[i].sctpIn;
}
sctp.to_ip --> networkLayer.sctpIn;
networkLayer.sctpOut --> sctp.from_ip;
}
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
omnetpp.ini :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
[General]
network = Scenario
cpu-time-limit = 3000s
sim-time-limit = 180s
# Set testing
Scenario.testing = true
Scenario.logverbose = true
# For Wired hosts
**.networkLayer.proxyARP = true
**.networkLayer.arp.cacheTimeout = 120s
**.networkLayer.arp.retryTimeout = 1s
**.networkLayer.arp.retryCount = 3
**.globalARP = false
# SEE:
http://www7.informatik.uni-erlangen.de/~sommer/publications/pdf/sommer2007realistic.pdf
#Sets for wireless
**.channelControl.playgroundSizeX = 600
**.channelControl.playgroundSizeY = 400
**.channelControl.numChannels = 5
**.channelControl.alpha = 1.9 # def. 2 Path loss Coefficient
**.channelControl.carrierFrequency = 2.4GHz
**.channelControl.sat = -80dBm # def. -110
**.channelControl.pMax = 1.0mW
**.mac.maxQueueSize = 10
**.mac.bitrate = 11Mbps
**.radio.bitrate = 11Mbps
**.radio.transmitterPower = 1.0mW # other 70
**.radio.thermalNoise = -110dBm
**.radio.pathLossAlpha = 1.9 # def. 2
**.radio.sensitivity = -85dBm
**.radio.snirThreshold = 3dB # def 4dB
**.wlan.mgmt.numAuthSteps = 2 # 2 Open System, 4 WEP
#Settings for APs.
**.R1s.wlan.mgmt.ssid ="netS1"
**.R1s.wlan.mac.address = "auto"
**.R1s.wlan.mac.maxQueueSize = 100
**.R1s.wlan.mac.rtsThresholdBytes = 2346B
**.R1s.wlan.mac.bitrate = 11Mbps
**.R1s.wlan.mac.retryLimit = -1
**.R1s.wlan.mac.cwMinData = -1
**.R1s.wlan.mac.cwMinBroadcast = -1
**.R1s.wlan.mac.mtu = 1500
**.R1s.wlan.radio.channelNumber = 1
**.R1s.eth[0].address = "auto"
**.R1s.eth[0].txrate = 10Mbps
**.R1s.eth[0].mtu = 1500
#**.R1s.mobility.x = 25
#**.R1s.mobility.y = 160
#Settings for APs.
**.R2s.wlan.mgmt.ssid = "netS2"
**.R2s.wlan.mac.address = "auto"
**.R2s.wlan.mac.maxQueueSize = 100
**.R2s.wlan.mac.rtsThresholdBytes = 2346B
**.R2s.wlan.mac.bitrate = 11Mbps
**.R2s.wlan.mac.retryLimit = -1
**.R2s.wlan.mac.cwMinData = -1
**.R2s.wlan.mac.cwMinBroadcast = -1
**.R2s.wlan.mac.mtu = 1500
**.R2s.wlan.radio.channelNumber = 2
**.R2s.eth[0].address = "auto"
**.R2s.eth[0].txrate = 10Mbps
**.R2s.eth[0].mtu = 1500
#**.R2s.mobility.x = 50
#**.R2s.mobility.y = 160
#Settings for APs.
**.R3s.wlan.mgmt.ssid = "netS3"
**.R3s.wlan.mac.address = "auto"
**.R3s.wlan.mac.maxQueueSize = 100
**.R3s.wlan.mac.rtsThresholdBytes = 2346B
**.R3s.wlan.mac.bitrate = 11Mbps
**.R3s.wlan.mac.retryLimit = -1
**.R3s.wlan.mac.cwMinData = -1
**.R3s.wlan.mac.cwMinBroadcast = -1
**.R3s.wlan.mac.mtu = 1500
**.R3s.wlan.radio.channelNumber = 3
**.R3s.eth[0].address = "auto"
**.R3s.eth[0].txrate = 10Mbps
**.R3s.eth[0].duplexEnabled = true
**.R3s.eth[0].mtu = 1500
#**.R3s.mobility.x = 75
#**.R3s.mobility.y = 160
#Settings for APs.
**.R4s.wlan.mgmt.ssid = "netS4"
**.R4s.wlan.mac.address = "auto"
**.R4s.wlan.mac.maxQueueSize = 100
**.R4s.wlan.mac.rtsThresholdBytes = 2346B
**.R4s.wlan.mac.bitrate = 11Mbps
**.R4s.wlan.mac.retryLimit = -1
**.R4s.wlan.mac.cwMinData = -1
**.R4s.wlan.mac.cwMinBroadcast = -1
**.R4s.wlan.mac.mtu = 1500
**.R4s.wlan.radio.channelNumber = 4
**.R4s.eth[0].address = "auto"
**.R4s.eth[0].txrate = 10Mbps
**.R4s.eth[0].duplexEnabled = true
**.R4s.eth[0].mtu = 1500
#**.R4s.mobility.x = 100
#**.R4s.mobility.y = 160
#Conf of mobile node
**.Src.numTcpApps = 0
**.Src.numUdpApps = 0
**.Src.tcpAppType = "TcpBasicClientApp"
**.Src.udpAppType = "UDPApp"
**.Dst.numUdpApps = 0
**.Dst.udpAppType = "UDPApp"
**.Dst.numTcpApps = 0
**.Dst.tcpAppType = "TCPSinkApp"
**.Src.mobilityType = "LinearMobility" # TBD
#**.Src.mobilityType = "NullMobility" # TBD
**.Src.mobility.x = 20
**.Src.mobility.y = 280
#**.Src.mobility.x = -1
#**.Src.mobility.y = -1
**.Src.mobility.speed = 2mps
**.Src.mobility.angle = 0
**.Src.mobility.acceleration = 0
**.Src.mobility.updateInterval = 100ms
**.Src.wlan[*].mac.address="auto"
**.Src.wlan[*].agent.startingTime = 1s
**.Src.wlan[0].agent.default_ssid = "netS1"
**.Src.wlan[0].agent.channelsToScan = "1"
**.Src.wlan[0].radio.channelNumber = 1
**.Src.wlan[1].agent.default_ssid = "netS2"
**.Src.wlan[1].agent.channelsToScan = "2"
**.Src.wlan[1].radio.channelNumber = 2
**.Src.wlan[2].agent.default_ssid = "netS3"
**.Src.wlan[2].agent.channelsToScan = "3"
**.Src.wlan[2].radio.channelNumber = 3
**.Src.wlan[3].agent.default_ssid = "netS4"
**.Src.wlan[3].agent.channelsToScan = "4"
**.Src.wlan[3].radio.channelNumber = 4
# Optimized SCTP
**.sctp.pathMaxRetrans = 3
**.sctp.rtoMin = 0.020s
**.sctp.sackPeriod = 0.020s
# SCTP Traffic
**.Dst.numSctpApps = 1
**.Dst.sctpAppType = "SCTPServer"
**.Dst.sctpApp[0].address = ""
**.Dst.sctpApp[0].port = 66
**.Dst.sctpApp[0].numPacketsToReceivePerClient = 0
**.Dst.sctpApp[0].numPacketsToSendPerClient = 0
**.Dst.sctpApp[0].thinkTime = 0s
**.Dst.sctpApp[0].waitToClose = 0s
**.Dst.sctpApp[0].delayFirstRead = 0s
**.Src.numSctpApps = 1
**.Src.sctpAppType = "SCTPClient"
**.Src.sctpApp[0].address = ""
**.Src.sctpApp[0].connectAddress = "10.1.9.1"
**.Src.sctpApp[0].primaryPath = "10.1.9.1"
**.Src.sctpApp[0].connectPort = 66
**.Src.sctpApp[0].startTime = 5s
**.Src.sctpApp[0].numRequestsPerSession = 100
**.Src.sctpApp[0].requestLength = 1000
**.Src.sctpApp[0].thinkTime = 0s
**.Src.sctpApp[0].waitToClose = 0s
#**.Src.pingApp.destAddr = "10.1.9.1"
#**.Src.pingApp.srcAddr="10.1.1.1"
#**.Src.pingApp.packetSize=56B
#**.Src.pingApp.interval=1s
#**.Src.pingApp.hopLimit=32
#**.Src.pingApp.count=0
#**.Src.pingApp.startTime = uniform(10s,11s)
#**.Src.pingApp.printPing=true
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Src.mrt :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ifconfig:
# ethernet card (modelled by point-to-point link)
name: wlan0 inet_addr: 10.1.1.1 MTU: 1500 Metric: 1 BROADCAST
MULTICAST
name: wlan1 inet_addr: 10.1.2.1 MTU: 1500 Metric: 1 BROADCAST
MULTICAST
name: wlan2 inet_addr: 10.1.3.1 MTU: 1500 Metric: 1 BROADCAST
MULTICAST
name: wlan3 inet_addr: 10.1.4.1 MTU: 1500 Metric: 1 BROADCAST
MULTICAST
ifconfigend.
route:
#10.1.1.1 10.1.1.1 255.255.255.255 H 0 wlan0
10.1.9.0 10.1.1.254 255.255.255.0 G 0 wlan0
#10.1.2.1 10.1.2.1 255.255.255.255 H 0 wlan1
10.1.10.0 10.1.2.254 255.255.255.0 G 0 wlan1
#10.1.3.1 10.1.3.1 255.255.255.255 H 0 wlan2
10.1.11.0 10.1.3.254 255.255.255.0 G 0 wlan2
#10.1.4.1 10.1.4.1 255.255.255.255 H 0 wlan3
10.1.12.0 10.1.4.254 255.255.255.0 G 0 wlan3
#default: 10.1.1.254 0.0.0.0 G 0 wlan0
routeend.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
R1s.mrt :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ifconfig:
# ethernet card (modelled by point-to-point link)
name: wlan inet_addr: 10.1.1.254 Mask: 255.255.255.0 MTU: 1500
Metric: 1 BROADCAST MULTICAST
# ethernet card (modelled by point-to-point link)
name: ppp0 inet_addr: 10.1.5.254 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
ifconfigend.
route:
default: 10.1.5.253 0.0.0.0 G 0 ppp0
routeend.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
R1d.mrt :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ifconfig:
# ethernet card (modelled by point-to-point link)
name: ppp1 inet_addr: 10.1.9.254 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
# ethernet card (modelled by point-to-point link)
name: ppp0 inet_addr: 10.1.5.253 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
ifconfigend.
route:
10.1.1.0 10.1.5.254 255.255.255.0 G 0 ppp0
routeend.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Dst.mrt :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ifconfig:
# ethernet card (modelled by point-to-point link)
name: ppp0 inet_addr: 10.1.9.1 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
name: ppp1 inet_addr: 10.1.10.1 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
name: ppp2 inet_addr: 10.1.11.1 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
name: ppp3 inet_addr: 10.1.12.1 Mask: 255.255.255.0 MTU: 1500
Metric: 1 POINTTOPOINT MULTICAST
ifconfigend.
route:
#10.1.9.1 10.1.9.1 255.255.255.255 H 0 ppp0
10.1.1.0 10.1.9.254 255.255.255.0 G 0 ppp0
#10.1.10.1 10.1.10.1 255.255.255.255 H 0 ppp1
10.1.2.0 10.1.10.254 255.255.255.0 G 0 ppp1
#10.1.11.1 10.1.11.1 255.255.255.255 H 0 ppp2
10.1.3.0 10.1.11.254 255.255.255.0 G 0 ppp2
#10.1.12.1 10.1.12.1 255.255.255.255 H 0 ppp3
10.1.4.0 10.1.12.254 255.255.255.0 G 0 ppp3
#default: 10.1.9.254 0.0.0.0 G 0 ppp0
routeend.
I'm ommitting the routing configuration of the remaining routers,
namely R2, R3 and R4 and the 'logic' is the same as R1s and R1d.
Best Regards,
Bruno