Subject: Re: [dtn-users] DTN2 - Dynamic IPs

From: Till Lorentzen <[email-masked]>
Date: Mon, 01 Oct 2012 12:15:17 +0200

Dear Filipe,

If I am understanding you correctly, you need a dynamic routing
mechanism. Is it correct, that your host can communicate directly, if
they are in transmission range? In this scenario, you have got to
enable a service discovery for your chosen convergence layer. So your
neighbours can find each other. To communicate with others (non direct
neighbours) you must enable a dynamic routing mechanism. As example,
you could use flooding instead of static routing:

route set type flood

I'm a DTN2 newbie, so I'm not sure about its possibilities. But in the
newest source code, there is also a prophet routing mechanism. This
should be better than flooding and is designed for mobile and dynamic
networks.

@All: Can prophet be enabled? And how? route set type prophet?

Best regards,
	Till Lorentzen

Am 01.10.2012 11:41, schrieb Filipe Neves:
> Dear all,
> 
> First of all, thanks for your quick response.
> 
> Detailing a little my idea, I would like to try use the platform
> DTN2 in vehicular networks. What happens is that a network of this
> size it is impossible to have a list of all possible links.  What I
> would like to check was whether the DTN2 create a link for each
> node that came in their way (at range, with communication),
> creating a route for each node. When the nodes get out of the reach
> and stop sending beacons (because there is no communication), then
> this links would be eliminated and the source node would have to
> store the information he intended to deliver.
> 
> Thus, when he wanted to send a file or a string would have to enter
> only the hostname as destination. My question is how I can
> configure that? I only can communicate when I use /route set type
> static/ and configure all the links with static IPs. How can I
> configure the dtn.conf to automatically go putting the nodes in
> range in a routing table which we can communicate at each moment?
> 
> Thank you for your time.
> 
> Best regards,
> 
> Filipe Neves
> 
> On 28-09-2012 21:39, Till Lorentzen wrote:
>> Dear Filipe and Carlo,
>> 
>> yes, that is the simplest and fastest way to solve the problem.
>> But with a "little" bit of coding work, there could be another
>> solution. I implemented a UDP DHT based mechanism to resolve a
>> given EID to Convergence Layer Information. It is an C++ library,
>> available on 
>> http://git.ibr.cs.tu-bs.de/?p=libdtndht.git;a=summary or on
>> github https://github.com/soneyworld/dtndht . The mechanism has
>> been published at the ACM CHANTS 2012. It is used by the IBRDTN
>> implementation. So if anyone is interested in an integration into
>> DTN2: Feel free to contact me for more details!
>> 
>> The main benefit of this approach is a full distributed EID
>> lookup service for direct or maybe also indirect communication
>> between the DTN members. So you will reach the maximum bandwidth
>> between too nodes. And you could also add an intermediate node
>> for store carry and forward.
>> 
>> BUT you will get a communication overhead for the DHT. So if
>> your traffic volume is limited on a cellular network, I would use
>> the way, Filipe described. And also, it's lookup speed isn't that
>> fast (worst case ~30 sec) and reliable (worst case ~90% success
>> ratio), as a configured link. But it is a possibility, which
>> comes for free!
>> 
>> Best regards, Till Lorentzen
>> 
>> Am 28.09.2012 19:46, schrieb ccaini:
>>> Dear Filipe, Yes you can. At the University of Bologna we have
>>> carried out many experiments by using a smartphone (Nokia N900,
>>> OS MAEMO, DTN2) as either source or destination of bundles in a
>>> DTN networks. The smartphone used the 3G UMTS interface, with a
>>> public but dynamic IP address assigned by the 3G cellular
>>> network operator. In brief, the IP address of the smartphopne
>>> was changed each time the 3G interface was switched off and
>>> on. On the node with the dynamic IP yuou should define an
>>> ALWAYSON link to a fixed IP (i.e the IP of a DTN node working
>>> as a gateway towards the rest of the network), and a route to
>>> specify that the bundles to your DTN destination must be routed
>>> through this link. For exemple, in the dtn.conf of
>>> smartphone.dtn you should add:
>>> 
>>> link add linknameisbill 136.203.45.61 ALWAYSON tcp route add
>>> dtn://mydestination.dtn/* linknameisbill
>>> 
>>> Once the 3G interface is switched on, a new IP address is
>>> assigned and the TCPCL of the smartphone always tries to
>>> establish a new TCP connection to the fixed IP (136.203.45.61)
>>> of the DTN gateway. Once established, the two DTN node TCPCLs
>>> exchange information about their dtn names, and the DTN gateway
>>> adds by itself a new opportunistic link (e.g. link0) to the 
>>> dynamic IP (note that the TCP connectioopn is bidirectional,
>>> thus, although established "to" the gateway can be used also to
>>> carry traffic "from" it), and a new route to smartphone.dtn
>>> through the opportunistic link0.
>>> 
>>> Note that in this way, not only can you send bundle from a node
>>> with a dynamic IP, but you can also send bundles to it. For
>>> instance, you can send a bundle to smartphone.dtn when the
>>> smartphone is switched off! The bundle will be taken into
>>> custody by the gateway and delivered once the smartphone and
>>> its 3G interface are switched on and the dynamic IP assigned. 
>>> Moreover, the same holds true for nodes with an IP natted. It
>>> still works, because the "trick" is that thanks to the ALWAYSON
>>> command the TCP connection is always established by the node
>>> with the dynamic or natted IP, although used "opportunitically"
>>> in the reverse direction.
>>> 
>>> Yours sincerely, Carlo Caini
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Thu, 27 Sep 2012 09:38:57 +0100, Filipe Neves
>>> <[email-masked]> wrote:
>>>> Hi.
>>>> 
>>>> First of all I would like to say congratulations to your
>>>> platform DTN2, I'm starting to work with it and verify which
>>>> its main advantages, limitations and possible developments /
>>>> improvements that can be implemented in the coming future.
>>>> 
>>>> However I have a question not yet solved. With your framework
>>>> I could communicate between 2 different PCs, but only with
>>>> static routes and links. My question is if it is possible to
>>>> communicate PCs but through no static routes (dynamic IPs),
>>>> that is, imagine a scenario where I know the name of DTN
>>>> destination that I want to connect but do not know what the
>>>> IP. Is that possible? I can I configure this on dtn.conf?
>>>> 
>>>> Thank you very much!
>>>> 
>>>> Best regards,
>>> _______________________________________________ dtn-users
>>> mailing list [email-masked] 
>>> https://www.irtf.org/mailman/listinfo/dtn-users
>>> 
> 
>

---

From: Filipe Neves <[email-masked]>
Date: Mon, 1 Oct 2012 10:41:52 +0100

Dear all,

Detailing a little my idea, I would like to try use the platform DTN2 in 
vehicular networks. What happens is that a network of this size it is 
impossible to have a list of all possible links.  What I would like to 
check was whether the DTN2 create a link for each node that came in 
their way (at range, with communication), creating a route for each 
node. When the nodes get out of the reach and stop sending beacons 
(because there is no communication), then this links would be eliminated 
and the source node would have to store the information he intended to 
deliver.

Thus, when he wanted to send a file or a string would have to enter only 
the hostname as destination. My question is how I can configure that? I 
only can communicate when I use /route set type static/ and configure 
all the links with static IPs. How can I configure the dtn.conf to 
automatically go putting the nodes in range in a routing table which we 
can communicate at each moment?

Thank you for your time.

Best regards,

Filipe Neves

On 28-09-2012 21:39, Till Lorentzen wrote:
> Dear Filipe and Carlo,
>
> yes, that is the simplest and fastest way to solve the problem. But with
> a "little" bit of coding work, there could be another solution. I
> implemented a UDP DHT based mechanism to resolve a given EID to
> Convergence Layer Information. It is an C++ library, available on
> http://git.ibr.cs.tu-bs.de/?p=libdtndht.git;a=summary or on github
> https://github.com/soneyworld/dtndht . The mechanism has been published
> at the ACM CHANTS 2012. It is used by the IBRDTN implementation. So if
> anyone is interested in an integration into DTN2: Feel free to
> contact me for more details!
>
> The main benefit of this approach is a full distributed EID lookup
> service for direct or maybe also indirect communication between the DTN
> members. So you will reach the maximum bandwidth between too nodes. And
> you could also add an intermediate node for store carry and forward.
>
> BUT you will get a communication overhead for the DHT. So if your
> traffic volume is limited on a cellular network, I would use the way,
> Filipe described. And also, it's lookup speed isn't that fast (worst
> case ~30 sec) and reliable (worst case ~90% success ratio), as a
> configured link. But it is a possibility, which comes for free!
>
> Best regards,
> 	Till Lorentzen
>
>>      Yes you can. At the University of Bologna we have carried out many
>> experiments by using a smartphone (Nokia N900, OS MAEMO, DTN2) as either
>> source or destination of bundles in a DTN networks.
>> The smartphone used the 3G UMTS interface, with a public but dynamic IP
>> address assigned by the 3G cellular network operator. In brief, the IP
>> address of the smartphopne was changed each time the 3G interface was
>> switched off and on.
>> On the node with the dynamic IP yuou should define an ALWAYSON link to a
>> fixed IP (i.e the IP of a DTN node working as a gateway towards the rest of
>> the network), and a route to specify that the bundles to your DTN
>> destination must be routed through this link.
>> For exemple, in the dtn.conf of smartphone.dtn you should add:
>>
>> link add linknameisbill 136.203.45.61 ALWAYSON tcp
>> route add dtn://mydestination.dtn/* linknameisbill
>>
>> Once the 3G interface is switched on, a new IP address is assigned and the
>> TCPCL of the smartphone always tries to establish a new TCP connection to
>> the fixed IP (136.203.45.61) of the DTN gateway. Once established, the two
>> DTN node TCPCLs exchange information about their dtn names, and the DTN
>> gateway adds by itself a new opportunistic link (e.g. link0) to the dynamic
>> IP (note that the TCP connectioopn is bidirectional, thus, although
>> established "to" the gateway can be used also to carry traffic "from" it),
>> and a new route to smartphone.dtn through the opportunistic link0.
>>
>> Note that in this way, not only can you send bundle from a node with a
>> dynamic IP, but you can also send bundles to it. For instance, you can send
>> a bundle to smartphone.dtn when the smartphone is switched off! The bundle
>> will be taken into custody by the gateway and delivered once the smartphone
>> and its 3G interface are switched on and the dynamic IP assigned.
>> Moreover, the same holds true for nodes with an IP natted. It still works,
>> because the "trick" is that thanks to the ALWAYSON command the TCP
>> connection is always established by the node with the dynamic or natted IP,
>> although used "opportunitically" in the reverse direction.
>>
>> Yours sincerely,
>>     Carlo Caini
>>
>>   
>>
>>
>>
>>
>> On Thu, 27 Sep 2012 09:38:57 +0100, Filipe Neves <[email-masked]> wrote:
>>> Hi.
>>>
>>> First of all I would like to say congratulations to your platform DTN2,
>>> I'm starting to work with it and verify which its main advantages,
>>> limitations and possible developments / improvements that can be
>>> implemented in the coming future.
>>>
>>> However I have a question not yet solved. With your framework I could
>>> communicate between 2 different PCs, but only with static routes and
>>> links. My question is if it is possible to communicate PCs but through
>>> no static routes (dynamic IPs), that is, imagine a scenario where I know
>>> the name of DTN destination that I want to connect but do not know what
>>> the IP. Is that possible? I can I configure this on dtn.conf?
>>>
>>> Thank you very much!
>>>
>>> Best regards,
>> _______________________________________________
>> dtn-users mailing list
>> [email-masked]

---

From: Filipe Neves <[email-masked]>
Date: Mon, 1 Oct 2012 16:56:20 +0100

Thank you for your answer Mr. Lorentzen. In fact, this is the scenario 
that I would like to try.

In dtn.conf I've this configuration:

DTN 1:

  * route set type flood

  * route local_eid "dtn://dtn1.dtn"

DTN 2:

  * route set type flood

  * route local_eid "dtn://dtn2.dtn"

Then, when I start the DTN2 daemon I enter the next configuration (same 
on both PCs):

  * discovery add udp0d ip port=9556
  * discovery announce udp0 udp0d udp interval=10

However, when I enter these commands on both PCs, from 10 to 10 seconds 
the following is displayed on the console:
[1349099395.051576 /dtn/contact/manager error] 
ContactManager::new_opportunistic_link: failed to add new opportunistic 
link link-1

 From what I gather, it seems that is indeed found a new connection, but 
is failing to make the link.
What I'm doing wrong? Is missing some setting?

Thank you very much for help.

Filipe Neves