sending packet to a remote node from different wireless networks

19 views
Skip to first unread message

SUBIN JOSEPH

unread,
Jun 27, 2016, 8:39:17 PM6/27/16
to ns-3-users
Hello I want to simulate a network in which each node(client) from every network should send data to a remote node(server).So I modified the wireless_bridge_wired.cc program.Please find the attached file here with.

Here I am only able to send packet from the first network.It is not working for the rest of the networks.When I debugged it.I found that problem is in echo server application.


 for (uint32_t i = 0; i < nWifis; ++i)
    {
         if(i==0)
       {
     station=sta.Get(1);
     statInt=staInterface.GetAddress(1);

      //creating udp applications
        UdpEchoServerHelper echoServer (9);
        ApplicationContainer serverApps = echoServer.Install(station);
      serverApps.Start (Seconds (1.0));
      serverApps.Stop (Seconds (10.0));

       }

    UdpEchoClientHelper echoClient (statInt, 9);
    echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
    echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
    echoClient.SetAttribute ("PacketSize", UintegerValue (1024));

    ApplicationContainer clientApps = echoClient.Install(sta.Get(0));
    clientApps.Start (Seconds (2.0));

}


The current output is like following:

At time 2s client sent 1024 bytes to 192.168.0.5 port 9
At time 2s client sent 1024 bytes to 102.102.102.102 port 9 //I don't know why it is like this
At time 2.00788s server received 1024 bytes from 192.168.0.4 port 49153
At time 2.00788s server sent 1024 bytes to 192.168.0.4 port 49153
At time 2.01299s client received 1024 bytes from 192.168.0.5 port 9

Please help to find the problem.I have been stuck in this for past 2 weeks.




cloud2.cc
Reply all
Reply to author
Forward
0 new messages