Still wifi and multicast - now with testcase

74 views
Skip to first unread message

Francesco Malandrino

unread,
Jan 21, 2009, 3:43:11 PM1/21/09
to ns-3-...@googlegroups.com
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.

multicast-testcase.cc

Mathieu Lacage

unread,
Feb 24, 2009, 3:36:15 AM2/24/09
to ns-3-...@googlegroups.com
hi francesco,


I apologize very much for answering this email so late (one month !). I
looked at your testcase. The packet does not seem to make it to the wifi
AP code:


[mlacage@diese ns-3-dev]$ NS_LOG=Ipv4L3Protocol ./build/debug/scratch/multicast-testcase
...
Sent 1024 bytes to 239.192.36.3
2.00369s Ipv4L3Protocol:Receive(0x998e180, 0xbfa92ef8, 0x997cef8, 2048, 03-06-00:00:00:00:00:02)
2.00369s Ipv4L3Protocol:Receive(): Packet from 03-06-00:00:00:00:00:02 received on node 0
2.00369s Ipv4L3Protocol:Forwarding(1, 0x99861a0, 0xbfa92d58, 0x99891e0)
2.00369s Ipv4L3Protocol:Forwarding(): Forwarding logic for node: 0
2.00369s Ipv4L3Protocol:DoForward(0x998e180, 1, 0x99861a0, tos 0x0 ttl 64 id 0 protocol 17 offset 0 flags [none] length: 1052 10.1.1.2 > 239.192.36.3)
2.00369s Ipv4L3Protocol:DoForward(): Not for me, forwarding.
2.00369s Ipv4L3Protocol:Lookup(0x998e180, 1, 0xbfa92cbc, 0x99861a0, 0xbfa92b34)
2.00369s Ipv4L3Protocol:Lookup(): Requesting route
2.00369s Ipv4L3Protocol:SendRealOut(0x998e180, 0, 0xbfa929e8, 0x99861a0, 0xbfa92cbc)
2.00369s Ipv4L3Protocol:SendRealOut(): No route to host. Drop.
...

i.e., Ipv4L3Protocol:SendRealOut does not find an outgoing route for
your ip packet so, it drops it. This would tend to support the idea that
your multicast route configuration is wrong. I don't know much about
what is happening in the ip layer for multicast packets...

Mathieu

francesco

unread,
Feb 24, 2009, 9:04:24 AM2/24/09
to ns-3-users
> your ip packet so, it drops it. This would tend to support the idea that
> your multicast route configuration is wrong. I don't know much about
> what is happening in the ip layer for multicast packets...

I have no prejudice against this idea ;)
Nonetheless, the question remains: how do I have to setup the
multicast L3 configuration?

Tom Henderson

unread,
Mar 1, 2009, 2:03:32 PM3/1/09
to ns-3-...@googlegroups.com

Francesco,
Sorry it took me a long time to address your question.

Here are changes I made to your testcase to make it work.

//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.

Reply all
Reply to author
Forward
0 new messages