Wireless OMNeT++;openflow无线

Wireless OMNeT++;openflow无线,wireless,omnet++,openflow,Wireless,Omnet++,Openflow,我正在尝试将无线网卡集成到openflow交换机中(我想用openflow模拟vanet,所以我需要无线通信) 这是开关的代码 package openflow.nodes; import openflow.*; import inet.linklayer.ieee80211.Ieee80211Nic; module Wireless_Openflow_switch extends Open_Flow_Switch { parameters: int numRadio

我正在尝试将无线网卡集成到openflow交换机中(我想用openflow模拟vanet,所以我需要无线通信) 这是开关的代码

package openflow.nodes;

import openflow.*;
import inet.linklayer.ieee80211.Ieee80211Nic;

module Wireless_Openflow_switch extends Open_Flow_Switch
{
    parameters:
        int numRadios = default(10);               // the number of radios in the access point

    submodules:
        wlan[numRadios]: Ieee80211Nic{
            mgmtType="Ieee80211MgmtAP";
        }
}
我还创建了一个场景来测试它,下面是代码:

package openflow.scenarios;

import inet.nodes.ethernet.EtherSwitch;
import inet.nodes.inet.Router;
import inet.nodes.inet.StandardHost;
import inet.networklayer.autorouting.ipv4.FlatNetworkConfigurator;
import openflow.nodes.Open_Flow_Controller;
import openflow.nodes.Wireless_Openflow_switch;
import inet.util.ThruputMeteringChannel;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.inet.AdhocHost;
import inet.world.radio.ChannelControl;


network test

{
    @display("bgb=780,513");
    types:
        channel ethernetline extends ThruputMeteringChannel
        {
            delay = 1us;
            datarate = 100Mbps;
            thruputDisplayFormat = "u";
        }
    submodules:
        wofs1 : Wireless_Openflow_switch
        {
            @display("p=537,306");
        }

        wofs2 : Wireless_Openflow_switch
        {
            @display("p=537,366");
        }
        wofs3 : Wireless_Openflow_switch
        {
            @display("p=437,366");
        }
        wofs4 : Wireless_Openflow_switch
        {
            @display("p=337,366");
        }
        host1 : AdhocHost
        {
            @display("p=200,306");
        }
        host2 : AdhocHost
        {
            @display("p=250,380");
        }
        host3 : AdhocHost
        {
            @display("p=500,125");
        }
        channelControl: ChannelControl {
            parameters:
                @display("p=60,50");
        }
        configurator: IPv4NetworkConfigurator {
            config=xml("<config><interface hosts='*' address='192.168.1.x' netmask='255.255.255.0'/></config>");
            @display("p=140,50");
    }
        controller: Open_Flow_Controller {
            @display("p=338,167");
        }


        connections allowunconnected:
            controller.ethg++ <--> ethernetline <--> wofs1.gate_controller++;
            controller.ethg++ <--> ethernetline <--> wofs2.gate_controller++;
            controller.ethg++ <--> ethernetline <--> wofs3.gate_controller++;
            controller.ethg++ <--> ethernetline <--> wofs4.gate_controller++;
            wofs1.ethg++ <--> ethernetline <--> wofs2.ethg++;
            wofs1.ethg++ <--> ethernetline <--> wofs3.ethg++;
            wofs1.ethg++ <--> ethernetline <--> wofs4.ethg++;
            wofs2.ethg++ <--> ethernetline <--> wofs3.ethg++;
            wofs2.ethg++ <--> ethernetline <--> wofs4.ethg++;
            wofs4.ethg++ <--> ethernetline <--> wofs3.ethg++;
}
运行此代码时,会出现以下错误: 网络初始化期间,模块(IPv4NetworkConfigurator)test.configurator(id=10)中出错:找不到接口test.wofs2.eth0和1个其他接口的地址前缀(使用192.168.1.0,指定位为255.255.255.0)和网络掩码(长度从24位到24位)。请优化您的参数并重试

网络掩码和地址前缀的正确值是多少??
提前感谢。

您正在使用omnet++4.2和openflow 1.1。。。。。有导游吗?
[General]
network = test
#record-eventlog = true

num-rngs = 3
**.mobility.rng-0 = 1
**.wlan[*].mac.rng-0 = 2

**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 600m
**.constraintAreaMaxY = 400m
**.constraintAreaMaxZ = 0m
**.debug = true
**.coreDebug = false
**.host*.**.channelNumber = 0

# channel physical parameters
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 25.0mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
*.channelControl.numChannels = 1

# tcp apps
**.numTcpApps = 1
**.host*.tcpApp[0].typename = "TCPSessionApp"
**.host*.tcpApp[0].active = true
**.host*.tcpApp[0].localPort = -1
**.host*.tcpApp[0].connectAddress = "server1"
**.host*.tcpApp[0].connectPort = 1000
**.host*.tcpApp[0].tOpen = 2s
**.host*.tcpApp[0].tSend = 2s
**.host*.tcpApp[0].sendBytes = 3000000B
**.host*.tcpApp[0].sendScript = ""
**.host*.tcpApp[0].tClose = 100s


# mobility
**.host*.mobilityType = "MassMobility"
**.host*.mobility.initFromDisplayString = false
**.host*.mobility.changeInterval = truncnormal(2s, 0.5s)
**.host*.mobility.changeAngleBy = normal(0deg, 30deg)
**.host*.mobility.speed = truncnormal(20mps, 8mps)
**.host*.mobility.updateInterval = 100ms

# ping app (host[0] pinged by others)
**.pingApp[0].startTime = uniform(1s,5s)
**.pingApp[1].startTime = 5s+uniform(1s,5s)
**.pingApp[*].printPing = true

[Config Ping1]
description = "host1 pinging host2"

#openflow
**.controller.ofa_controller.port = 6633
**.controller.behavior = "Forwarding"

**.ofa_switch.connectPort = 6633
**.ofa_switch.connectAddress = "controller"
**.buffer.capacity = 10
**.ofa_switch.flow_timeout = 5s
**.wofs*.etherMAC[*].promiscuous = true

# NIC configuration
**.ppp[*].queueType = "FIFOQueue" # in routers


**.wofs*.tcp.mss = 800
**.controller.tcp.mss = 800