OMNET ++ - 如何通过TCP确定UDP的优先级

时间:2017-11-22 18:19:59

标签: tcp udp omnet++ traffic

您好我是omnet ++和网络模拟的新手,我有以下网络:

import inet.common.misc.NetAnimTrace;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.ethernet.Eth100M;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import inet.node.inet.WirelessHost;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.contract.IIntegratedVisualizer;




network clienteServer
{
@display("bgb=500,300");
submodules:
    visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
        parameters:
            @display("p=100,50");
    }
    configurator: IPv4NetworkConfigurator {
        parameters:
            assignDisjunctSubnetAddresses = false;
            @display("p=100,150");
    }
    radioMedium: Ieee80211ScalarRadioMedium {
        parameters:
            @display("p=100,250");
    }
    TCP1: WirelessHost {
        parameters:
            @display("p=186,178");
    }
    UDP1: WirelessHost {
        parameters:
            @display("p=193,77");
    }
    Server: WirelessHost {
        parameters:
            @display("p=438,122");
    }


    accessPoint: AccessPoint {
        parameters:
            @display("p=315,108");
    }
    UDP2: WirelessHost {
        parameters:
            @display("p=255,30");
    }


}

和我的.ini文件,如下,非常简单

[General]
network = clienteServer
total-stack = 7MiB
tkenv-plugin-path = ../../../etc/plugins
debug-on-errors = true
record-eventlog = true

**.addDefaultRoutes = false

**.UDP1.numUdpApps = 10
**.UDP1.udpApp[*].typename = "UDPVideoStreamCli"
**.UDP1.udpApp[*].serverAddress = "Server"
**.UDP1.udpApp[*].serverPort = 1000


**.UDP2.numUdpApps = 1
**.UDP2.udpApp[*].typename = "UDPBasicApp"
**.UDP2.udpApp[*].destAddresses = "Server"
**.UDP2.udpApp[*].messageLength = 1000B
**.UDP2.udpApp[*].sendInterval = 12ms




**.Server.numUdpApps = 1
**.Server.udpApp[*].typename = "UDPVideoStreamSvr"
**.Server.udpApp[*].localPort = 1000
 **.Server.udpApp[*].sendInterval = 10ms
**.Server.udpApp[*].packetLen = 2000B
**.Server.udpApp[*].videoSize = 100000B

**.TCP1.numTcpApps = 1
**.TCP1.tcpApp[*].typename = "TelnetApp"
**.TCP1.tcpApp[0].localAddress = ""
**.TCP1.tcpApp[0].localPort = -1
**.TCP1.tcpApp[0].connectAddress = "Server"
**.TCP1.tcpApp[0].connectPort = 1000


**.TCP1.tcpApp[0].startTime = 0
**.TCP1.tcpApp[0].commandLength = exponential(10B)
**.TCP1.tcpApp[0].commandOutputLength = exponential(5B)
**.TCP1.tcpApp[0].thinkTime = truncnormal(1s,2s)
**.TCP1.tcpApp[0].idleInterval = 10ms
**.TCP1.tcpApp[0].reconnectInterval = 3s
**.TCP1.tcpApp[0].dataTransferMode = "object"


**.Server.numTcpApps = 1
**.Server.tcpApp[*].typename = "TCPGenericSrvApp"
**.Server.tcpApp[0].localAddress = ""
**.Server.tcpApp[0].localPort = 1000
**.Server.tcpApp[0].replyDelay = 0








**.initialZ = 0


**.scalar-recording = true
**.vector-recording = true

正如你所看到的,我只有4个主机,一个充当服务器,两个UDP和一个发送TCP消息,我怎样才能优先处理TCP上的udp流量,简单的方法,有什么建议吗?

0 个答案:

没有答案