Omnet++ 无法解析omnet+;中的目标地址+/inet模块
我正在尝试使用INET模块设计一个三层数据中心模型。但是,当我运行网络时,每次创建TCP套接字时,我都会遇到以下错误:Omnet++ 无法解析omnet+;中的目标地址+/inet模块,omnet++,inet,Omnet++,Inet,我正在尝试使用INET模块设计一个三层数据中心模型。但是,当我运行网络时,每次创建TCP套接字时,我都会遇到以下错误: starting session issuing OPEN command cannot resolve destination address: 我的ned文件如下: 内德被解雇了 import inet.nodes.inet.Router; import inet.nodes.inet.StandardHost; import inet.nodes.ethernet.E
starting session
issuing OPEN command
cannot resolve destination address:
我的ned文件如下:
内德被解雇了
import inet.nodes.inet.Router;
import inet.nodes.inet.StandardHost;
import inet.nodes.ethernet.Eth10M;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
module Rack
{
parameters:
//int N @prompt(“Nodes per rack”);
int N = default(10)
@display("bgb=392,190");
gates:
inout iogate[];
submodules:
ComputingServer[N]: StandardHost {
@display("p=120,91");
}
AccessRouter: Router {
@display("p=289,91");
}
configurator: IPv4NetworkConfigurator;
connections:
for i=0..N-1 {
AccessRouter.ethg++ <--> Eth10M <--> ComputingServer[i].ethg++;
}
AccessRouter.ethg++ <--> iogate++;
AccessRouter.ethg++ <--> iogate++;
}
请帮我纠正错误。我刚刚开始使用inet进行编码。有两个错误:
TCPBasicClientApp
仅为客户端应用程序。作为服务器,您应该使用TCPGenericSrvApp
,参考Racks[0]
中的ComputingServer[0]
是一台服务器,它侦听端口号80,并且所有其他主机都连接到它,则您的omnetpp.ini
应该如下所示:
[Config basic_dcn]
network = Basic_dcn_tcp
**.tcpType = "TCP"
**.tcp.advertisedWindow = 65535
**.tcp.delayedAcksEnabled = false
**.tcp.increasedIWEnabled = false
**.tcp.limitedTransmitEnabled = false
**.tcp.mss = 1452
**.tcp.nagleEnabled =true
**.tcp.receiveQueueClass = default
**.tcp.recordStats = true
**.tcp.sackSupport = false
**.tcp.sendQueueClass = default
**.tcp.tcpAlgorithmClass = default
**.tcp.timestampSupport = true
**.tcp.windowScalingSupport = false
**.numTcpApps = 1
**.tcpApp[*].startTime = 0s
**.tcpApp[*].requestLength = 350B
**.tcpApp[*].replyLength = 5MiB
**.tcpApp[*].numRequestsPerSession = 1
**.tcpApp[*].thinkTime = 3s
**.tcpApp[*].idleInterval = 10s
**.tcpApp[*].reconnectInterval = 50s
**.tcpApp[*].dataTransferMode = "object"
# Racks[0].ComputingServer[0] listens on port 80
*.Racks[0].ComputingServer[0].tcpApp[*].typename = "TCPGenericSrvApp"
*.Racks[0].ComputingServer[0].tcpApp[*].localPort = 80
*.Racks[0].ComputingServer[0].tcpApp[*].localAddress = ""
# all other hosts connect to Racks[0].ComputingServer[0]
*.Racks[*].ComputingServer[*].tcpApp[*].typename = "TCPBasicClientApp"
*.Racks[*].ComputingServer[*].tcpApp[*].localPort = -1
*.Racks[*].ComputingServer[*].tcpApp[*].connectAddress = "Basic_dcn_tcp.Racks[0].ComputingServer[0]"
*.Racks[*].ComputingServer[*].tcpApp[*].connectPort = 80
提示:在INET
中,可以使用主机名作为IP地址。此外,我建议从
NED
文件中删除所有@display()
指令,因为它们使所有对象(该类型)位于同一位置。没有@display()
模拟环境将选择每个模块的正确位置
[Config basic_dcn]
network = Basic_dcn_tcp
**.tcpType = "TCP"
**.tcp.advertisedWindow = 65535
**.tcp.delayedAcksEnabled = false
**.tcp.increasedIWEnabled = false
**.tcp.limitedTransmitEnabled = false
**.tcp.mss = 1452
**.tcp.nagleEnabled =true
**.tcp.receiveQueueClass = default
**.tcp.recordStats = true
**.tcp.sackSupport = false
**.tcp.sendQueueClass = default
**.tcp.tcpAlgorithmClass = default
**.tcp.timestampSupport = true
**.tcp.windowScalingSupport = false
**.numTcpApps = 1
**.tcpApp[*].typename="TCPBasicClientApp"
**.tcpApp[*].localAddress = ""
**.tcpApp[*].localPort = -1
**.tcpApp[*].connectPort = 80
**.tcpApp[*].startTime = 0s
**.tcpApp[*].requestLength = 350B
**.tcpApp[*].replyLength = 5MiB
**.tcpApp[*].numRequestsPerSession = 1
**.tcpApp[*].thinkTime = 3s
**.tcpApp[*].idleInterval = 10s
**.tcpApp[*].reconnectInterval = 50s
**.tcpApp[*].dataTransferMode = "object"
[Config basic_dcn]
network = Basic_dcn_tcp
**.tcpType = "TCP"
**.tcp.advertisedWindow = 65535
**.tcp.delayedAcksEnabled = false
**.tcp.increasedIWEnabled = false
**.tcp.limitedTransmitEnabled = false
**.tcp.mss = 1452
**.tcp.nagleEnabled =true
**.tcp.receiveQueueClass = default
**.tcp.recordStats = true
**.tcp.sackSupport = false
**.tcp.sendQueueClass = default
**.tcp.tcpAlgorithmClass = default
**.tcp.timestampSupport = true
**.tcp.windowScalingSupport = false
**.numTcpApps = 1
**.tcpApp[*].startTime = 0s
**.tcpApp[*].requestLength = 350B
**.tcpApp[*].replyLength = 5MiB
**.tcpApp[*].numRequestsPerSession = 1
**.tcpApp[*].thinkTime = 3s
**.tcpApp[*].idleInterval = 10s
**.tcpApp[*].reconnectInterval = 50s
**.tcpApp[*].dataTransferMode = "object"
# Racks[0].ComputingServer[0] listens on port 80
*.Racks[0].ComputingServer[0].tcpApp[*].typename = "TCPGenericSrvApp"
*.Racks[0].ComputingServer[0].tcpApp[*].localPort = 80
*.Racks[0].ComputingServer[0].tcpApp[*].localAddress = ""
# all other hosts connect to Racks[0].ComputingServer[0]
*.Racks[*].ComputingServer[*].tcpApp[*].typename = "TCPBasicClientApp"
*.Racks[*].ComputingServer[*].tcpApp[*].localPort = -1
*.Racks[*].ComputingServer[*].tcpApp[*].connectAddress = "Basic_dcn_tcp.Racks[0].ComputingServer[0]"
*.Racks[*].ComputingServer[*].tcpApp[*].connectPort = 80