Problems in data transfer between wireless hosts using TCP

81 views
Skip to first unread message

Tiến Thành Nguyễn

unread,
Nov 9, 2017, 11:31:58 PM11/9/17
to omn...@googlegroups.com
Hello everyone,
i'm trying to simulate a MANET network using TCP, and the routing protocol i'm using is AODV. I try to have 4 hosts sends data to each other in pair ( host 1 to host 2; host 3 to host 4) but when i run the simulation, only host 1 send data, host 3 who needs to send data to just stand still and do nothing. Here is my ned and ini file. can someone tell me what i do wrong? thanks!
My ned file:

import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.aodv.AODVRouter;
import inet.physicallayer.idealradio.IdealRadioMedium;


network NeighborCacheTest
{
    parameters:
        int numHosts;
    submodules:
        radioMedium: IdealRadioMedium {
            parameters:
                @display("p=50,50");
        }
        configurator: IPv4NetworkConfigurator {
            parameters:
                config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
                @display("p=50,100");
        }
        host[numHosts]: AODVRouter {
            parameters:
                @display("i=device/pocketpc_s;r=,,#707070");
        }
    connections allowunconnected:
}

My ini file:
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 100m
**.constraintAreaMaxY = 100m
**.constraintAreaMaxZ = 0m

# channel physical parameters
**.wlan[*].typename = "IdealWirelessNic"
**.wlan[*].bitrate = 1Mbps
**.wlan[*].mac.address = "auto"
**.wlan[*].mac.headerLength = 20B
**.wlan[*].radioType = "IdealRadio"
**.wlan[*].radio.transmitter.headerBitLength = 0b
**.wlan[*].radio.transmitter.communicationRange = 250m
**.wlan[*].radio.transmitter.interferenceRange = 0m
**.wlan[*].radio.transmitter.detectionRange = 0m
**.wlan[*].radio.receiver.ignoreInterference = true
*.numHosts = 4

# mobility
**.host[0..1].mobilityType = "StationaryMobility"
**.host[*].mobility.initialX = uniform(0m, 100m)
**.host[*].mobility.initialY = uniform(0m, 100m)
**.host[*].mobility.initialZ = 0m



*.host[*].numTcpApps = 1
**.host[0].tcpApp[0].typename = "TCPSessionApp"
**.host[0].tcpApp[0].connectPort=  1234
**.host[0].tcpApp[0].connectAddress = "host[1]"
**.host[1].tcpApp[0].sendBytes = 500B
**.host[1].tcpApp[0].typename = "TCPSinkApp"
**.host[1].tcpApp[0].localPort= 1234



**.host[2].tcpApp[0].typename = "TCPSessionApp"
**.host[2].tcpApp[0].connectPort=  1234
**.host[2].tcpApp[0].connectAddress = "host[3]"
**.host[2].tcpApp[0].sendBytes = 500B
**.host[3].tcpApp[0].typename = "TCPSinkApp"
**.host[3].tcpApp[0].localPort= 1234


# AODV protocol settings
**.aodv.activeRouteTimeout = 3s

# neighbor cache settigns
**.neighborCache.refillPeriod = 1s

# radio medium
**.radioMedium.rangeFilter = "communicationRange"
**.radioMedium.neighborCacheType = "NeighborListNeighborCache"
**.radioMedium.neighborCache.range = 250m

Message has been deleted

Tiến Thành Nguyễn

unread,
Nov 11, 2017, 12:02:16 AM11/11/17
to OMNeT++ Users
can anyone help me please? i'm really stuck here

Alfonso Ariza Quintana

unread,
Nov 13, 2017, 5:13:39 AM11/13/17
to omn...@googlegroups.com

Are you sure that the node 2 doesn’t start a connection?

By default it should start a connection at the second 1.

 

Other problem is if the node can find a valid route, both nodes start the communication at the same time and exist a risk of collision in the RREQ/RREP packets sequence.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Tiến Thành Nguyễn

unread,
Nov 14, 2017, 4:49:03 AM11/14/17
to OMNeT++ Users
 
Dear Alfonso,
thank you for your response sir! I've tried setting host 0 and host 2 to send at the same time or different time but it still not work, still only host 0 communicate with host 1. isn't it supposed that these two connection are independent? i would appreciate if you could help me sir.

Alfonso Ariza Quintana

unread,
Nov 14, 2017, 4:50:52 AM11/14/17
to omn...@googlegroups.com

Have you check if the packet is sent?

It is possible that the application starts the connection but the nodes cannot communicate

Tiến Thành Nguyễn

unread,
Nov 14, 2017, 5:27:09 AM11/14/17
to omn...@googlegroups.com
That's the problem that i want to ask sir. i configure host 2 with "TCPSessionApp" and sendbytes= 500B but it doesnt send any packet. only host 0 does.

Alfonso Ariza Quintana

unread,
Nov 14, 2017, 5:13:18 PM11/14/17
to omn...@googlegroups.com
You need to check if the connection is done in the node, not if the packet is transmitted. You can check the trace in the node

De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de Tiến Thành Nguyễn <tienth...@gmail.com>
Enviado: martes, 14 de noviembre de 2017 11:27
Para: OMNeT++ Users

Asunto: Re: [Omnetpp-l] Re: Problems in data transfer between wireless hosts using TCP
 
That's the problem that i want to ask sir. i configure host 2 with "TCPSessionApp" and senbytes= 500B but it doesnt send any packet. only host 0 does.

Tiến Thành Nguyễn

unread,
Nov 15, 2017, 11:44:56 AM11/15/17
to omn...@googlegroups.com
Dear Alfonso,
Thank you for your response. I think the solution is that i need to use two radios for each node. One more problem that i have now is when i set the sendbytes = 300B. Only 300B is sent, and after that, the nodes stop sending package and it said " no more event, simulation completed". what i'm trying to do is to make the node send that 300B repeatedly until i stop the simulation. can you tell me how to do it? thanks. 
Reply all
Reply to author
Forward
0 new messages