Bug 494 - wifi and multicast routing reportedly wrong
: wifi and multicast routing reportedly wrong
Status: RESOLVED INVALID
: ns-3
routing
: ns-3-dev
: All All
: P1 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-02-11 02:51 EDT by
Modified: 2009-03-01 14:03 EDT (History)


Attachments
testcase (4.73 KB, text/x-c++src)
2009-02-11 02:52 EDT, Tom Henderson
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-02-11 02:51:51 EDT
From ns-3-users on 1/21/09:

Hi,

Attached you can find my testacase for Wifi and Multicast routing. It is 
a simplified version of examples/third.cc, basically a multicast 
datagram is supposed to flow from a p2p node to the other (which is also 
the AP), and then from it to a wireless station which joined the group.

 From the generated traces, what happens is:
* the multicast datagram is correctly generated;
* and correctly routed through the p2p channel, i.e. it arrives to node 0.

What does NOT happen is:
* I could not convince node 0 to forward the packet on the wireless 
interface (ap-0-1.pcap only has 802.11 stuff, no UDP traffic);
* I could not verify whether the station is able to correctly handle (I 
mean, using Socket) the reception of a multicast UDP frame.

Maybe I am missing something very basic...

Francesco

P.S.: I tested this with today's ns-3-dev version. It seems that the 
patch posted by Mathieu Lacage is already applied.
------- Comment #1 From 2009-02-11 02:52:53 EDT -------
Created an attachment (id=375) [details]
testcase
------- Comment #3 From 2009-03-01 14:01:48 EDT -------
Sorry, it took a long time for me to look at this one.

I am going to mark it as invalid since there is existing API to fix it.  The
below makes it work for me:
  //intermediate node    
- ip=wifiApNode.Get(1)->GetObject<Ipv4>();
- ip->SetDefaultMulticastRoute(2); //0 loopback, 1 p2p, 2 wifi    
+ StaticMulticastRouteHelper multicast;    
+ Ptr<Node> multicastRouter = wifiApNode.Get(0);    
+ Ptr<NetDevice> inputIf = multicastRouter->GetDevice (0); // The input
NetDevice 
+ NetDeviceContainer outputDevices;  // A container of output NetDevices  
+ outputDevices.Add (multicastRouter->GetDevice (1));    
+ multicast.AddMulticastRoute (multicastRouter, Ipv4Address ("10.1.1.2"), 
mcast_addr, inputIf, outputDevices);

Basically, SetDefaultMulticastRoute() is used for locally originated packets;
to add a multicast route to the intermediate node, use AddMulticastRoute()

The API for the StaticMulticastRouteHelper and static multicast routing will be
improved with the IPv4 rework.