Hello all,
Yes, I also saw a lot of messages in the group that say it should work.
It did not for me. I am using OMNet++ 4.2 and INET 2.0
I am trying to do a simple network with 2 hosts, that is, no router.
The network is depicted bellow. A UDP data traffic sends datagrams from host1 to host2.
host1-------------------------------host2
2001::1/64 2001::2/64
So, I did the following NED, host1.xml, and host2.xml files. When I run it, host1 never get it global unicast address (2001::1/64). Same as host2 (no global unicast address). The hosts get a link-local address, and the UDP datagrams are sent using link-local addresses. Anybody have an idea how to get global unicast addresses to work???
The syntax of the XML files are not documented!!!
Thank you.
Eric.
-------------------------- Begin of NED file --------------------------------
import inet.nodes.ipv6.StandardHost6;
import inet.nodes.ethernet.Eth100M;
network MyNetwork
{
submodules:
host1: StandardHost6
{
parameters:
@display("p=100,100;i=device/pc2");
routingTable = xmldoc("host1.xml");
numUdpApps = 1;
udpApp[0].typename = "UDPBasicApp";
udpApp[0].messageLength = 1024 B;
udpApp[0].sendInterval = 1.0 s;
udpApp[0].destPort = 8001;
udpApp[0].destAddresses = "host2";
udpApp[0].startTime = 30.0 s;
gates:
ethg[1];
}
host2: StandardHost6
{
parameters:
@display("p=700,100;i=device/pc2");
routingTable = xmldoc("host2.xml");
numUdpApps = 1;
udpApp[0].typename = "UDPSink";
udpApp[0].localPort = 8001;
gates:
ethg[1];
}
connections:
host1.ethg[0] <--> Eth100M <--> host2.ethg[0];
}
---------------------- End of NED file --------------------------
---------------------- Begin of host1.xml -------------------------
<routingTable>
<interface name="eth0">
<inetAddr>"2001::1"</inetAddr>
</interface>
</routingTable>
---------------------- End of host1.xml ---------------------------
---------------------- Begin of host2.xml -------------------------
<routingTable>
<interface name="eth0">
<inetAddr>"2001::2"</inetAddr>
</interface>
</routingTable>
---------------------- End of host2.xml ---------------------------