我正在用omnet ++进行网络仿真,我想使用2台路由器作为拓扑结构的网络客户端服务器,我使用了ipv4NetworkConfigurator模块自动分配IP地址和路由表。但我无法理解未找到错误“ ipv4NetworkConfigurator”
\\file ClientServeur.ned
package networkclientserver.simulations;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;
network ClientServer
{
submodules:
Client: StandardHost {
@display("p=56,154");
}
Server: StandardHost {
@display("p=501,154;i=device/server");
}
R1: Router {
@display("p=201,154");
}
R2: Router {
@display("p=342,154");
}
Configurator: IPv4NetworkConfigurator {
@display("p=251,62");
}
connections:
Client.pppg++ <--> DatarateChannel { delay = 100ms; datarate =
64kbps; } <--> R1.pppg++;
R1.pppg++ <--> DatarateChannel { delay = 100ms; datarate = 64kbps; }
<--> R2.pppg++;
R2.pppg++ <--> DatarateChannel { delay = 100ms; datarate = 64kbps; }
<--> Server.pppg++;
}
\\File omnetpp.ini
network = ClientServer
description = "Fully automatic IP address assignment"
# Configurator settings
tkenv-plugin-path = ../../../etc/plugins
record-eventlog = true
**.networkLayer.configurator.networkConfiguratorModule =
"Ipv4networkconfigurator"
**.channel.throughput.result-recording-modes = all
*.Configurator.dumpAddresses = true
*.Configurator.dumpTopology = true
*.Configurator.dumpLinks = true
*.Configurator.dumpRoutes = true
# Routing settings
*.*.ipv4.arp.typename = "GlobalArp"
#*.*.ipv4.routingTable.netmaskRoutes= ""
sim-time-limit = 100s
**.tcpType = "TCP"
**.Client.numTcpApps = 1
**.Client.tcpApp[*].typename = "TCPSessionApp"
**.Client.tcpApp[*].connectAddress = "server"
**.Client.tcpApp[*].connectPort = 80
**.Client.tcpApp[*].sendBytes = 10MiB
**.Server.numTcpApps = 1
**.Server.tcpApp[*].typename = "TCPSinkApp"
**.Server.tcpApp[*].localAddress = ""
**.Server.tcpApp[*].localPort = 80
**.tcpApp[*].dataTransferMode = "object"
**.R1.ppp[*].queueType ="DropTailQueue"
**.R1.ppp[*].queue.frameCapacity = 10
**.ppp[*].numOutputHooks = 1
**.ppp[*].outputHook[*].typename = "ThruputMeter"
\\end file
模块(inet :: IPv4NodeConfigurator)中的错误,找不到配置器模块'ipv4NetworkConfigurator'
答案 0 :(得分:0)
默认情况下,所有节点都希望配置器被称为configurator
(以小写字母开头),而您拥有
v
Configurator: IPv4NetworkConfigurator
^
以大写字母开头。按照惯例,建议以大写字母开头的模块名称,类型,接口名称,而对于参数,门和子模块名称则使用小写字母。