DescriptionMLDv2 implementation in |ns3|
-----------------------------
This chapter describes MLDv2 implementation in |ns3|.
Developed by Krishna Teja .
Model Description
*****************
The source code for MLDv2 model lives in the directory ``src/internet/model``.
The implementation of MLDv2 protocol is contained in the following files:
.. sourcecode:: text
src/internet/model/mldv2.{cc,h}
src/internet/model/mldv2-router-table.{cc,h}
src/internet/model/mldv2-router-entry.{cc,h}
src/internet/model/icmpv6-header.{cc,h}
Enabling MLDv2 protocol
***********************
By default MLDv2 protocol is disabled on an interface as this protocol generates periodic queries
To enable it one can create and aggregate MLDv2 object manually. As an example:
::
Ptr<Mldv2> mldv2 = CreateObject<Mldv2> ();
node->AggregateObject (mldv2);
MLDv2 protocol can also be enabled using InternetStackHelper.As an example:
::
n.Create (2);
InternetStackHelper internetv6;
internetv6.SetMldv2 (true);
internetv6.Install (n);
MLDV2 Interactions
******************
Sockets request to join multicast groups using pubic function::
Ipv6JoinGroup (Ipv6Address address, Ipv6MulticastFilterMode filterMode, std::vector<Ipv6Address> sourceAddresses)
This function is used as join, leave a multicast group or modify source filters of socket.
For users who intend not to use filters can use helper function which in-turn use the above method function::
Ipv6JoinGroup (Ipv6Address address);
Similarly for leaving group users can use function::
Ipv6LeaveGroup ();
Socket class notifies Mldv2 class about the joins and leaves. Mldv2 process these requests
and sends messages to different nodes using Icmpv6L4Protocol object. Icmpv6L4Protocol objects receive
these ICMP packets and send them to MLDv2 class for handling them.
MLDV2 Implementation
********************
* class :cpp:class:`Mldv2`: This class implements Mldv2 protocol and handles MLDV2 interactions.
* class :cpp:class:`Mldv2RouterEntry`: This class helps in updating source timers,
changing filter modes of the entry.
* class :cpp:class:`Mldv2RouterTable`: This class helps in adding, deleting Mldv2 entries and
also maintain filter timers.
Attributes
==========
The attributes that the Mldv2 class holds include the following:
* QueryInterval: The time gap between two consecutive general queries.
The default value is 125 seconds.
* LastListenerQueryInterval: The total time the router should wait for a report,
after the querier has sent the first query.The default value is 1 second.
* Robustness: Protocol robustness variable. The default value is 1.
As of now robustness variable is ignored.
* MaximumResponseDelay: The the maximum time allowed before sending a responding Report.
As of now Maximum Response Code value is ignored.
Examples
========
* Example: mldv2-example.cc located in src/internet/examples
** Run the file:
$ ./waf --run mldv2-example.cc
** Expected output from the previous commands: mldv2-0-1.pcap and mldv2.tr are produced
Validation
==========
The MLDv2 model is tested using Mldv2ProtocolTestSuite class defined in ``src/internet/test/mldv2-test.cc``.
The suite includes 3 tests:
* Test 1: The first test checks the operators of Mldv2 class.
* Test 2: The second test checks the proper joining and leaving of Multicast groups without filter options.
* Test 3: The third test checks the proper joining and leaving of Multicast groups with filter options.
The test suite can be run using the following commands:
$ ./waf configure --enable-examples --enable-tests
$ ./waf build
$ ./test.py mldv2-test
Todo
====
* Robustness variable is not considered as of now. So there is no tuning for the expected packet loss on the link. This
will be completed in the near time.
* Maximum response delay is not considered as on now. So as of now there are immediate reply to queries. This
will be completed in the near time.
Limitations
***********
* MLDv2 is spreading the nodes multicast groups join/leave events but MLDv2 alone cannot update routing tables.
This will handled in due time by developing PIM-SM protocol.
* Querier election is not handled as of now when there are multiple routers.This will handled in due time.
* Packet does not contain Router Alert Hop-By-Hop Option . The API to add Hop-By-Hop Options header of
the IPv6 packet is not yet defined.
Patch Set 1 #
Total comments: 10
MessagesTotal messages: 1
|