[hipl-users] Test fails due to use the HIT as a *real* address

  • From: "Jesús Rojo Martínez" <jrojomartinez@xxxxxxxxx>
  • To: "HIPL Users ML" <hipl-users@xxxxxxxxxxxxx>
  • Date: Wed, 7 Feb 2007 15:05:37 +0100

Hi!,

 I have to get two machines connected through HIP.
 I have a problem, cause they seems *only* to connect if I specify directly
the IP addresses (v4 or v6), but not if I specify the names. And actually
they connect through plain TCP, not HIP, even if I using the test
applications (conntest-server & conntest-client-gai).

 The names and the addresses are in /etc/hosts, as well as the HIT are
mapped in /etc/hip/hipd_config (or even setup with hipconf) and mapping
between HIT and names are in /etc/hip/hosts (even if I don't really
understand what is this file for :S). Anyway, it seems it's using OpenDHT to
resolv the mapping (I have even tried disabling it at compilation time).

 If I make a ping or ping6 to the peer name, it works perfectly. But if I
try to make the connection test it works if I specify the addresses, but not
if I specify the name (well, after many tries, with your prebuilt image, it
connects, but the same, with plain TCP, not using HIP at all).

 This is the output of conntest-client-gai:

jrojo@node1:~$ conntest-client-gai node2 tcp 1111
name='node2' service='1111'
flags: 800
not IPv4 or IPv6 address, resolve name (!AI_NUMERICHOST)
HIP_TRANSPARENT_API: fetch HIT addresses
name='planetlab1.diku.dk' service='5851'
flags: 8000
not IPv4 or IPv6 address, resolve name (!AI_NUMERICHOST)
HIP_TRANSPARENT_API: fetch HIT addresses
HIP_TRANSPARENT_API: AI_HIP unset: get IPv6 addresses too
Dumping the structure
AF_INET in_addr=0xc0266d8f (192.38.109.143)
Dumping the structure after removing IP addreses
AF_INET in_addr=0xc0266d8f (192.38.109.143)
Key was not found from the DHT
HIT received from DHT:
name='planetlab1.diku.dk' service='5851'
flags: 8000
not IPv4 or IPv6 address, resolve name (!AI_NUMERICHOST)
HIP_TRANSPARENT_API: fetch HIT addresses
HIP_TRANSPARENT_API: AI_HIP unset: get IPv6 addresses too
Dumping the structure
AF_INET in_addr=0xc0266d8f ( 192.38.109.143)
Dumping the structure after removing IP addreses
AF_INET in_addr=0xc0266d8f (192.38.109.143)
Error from the openDHT:
HIP_TRANSPARENT_API: AI_HIP set: do not get IPv6 addresses
Dumping the structure
AF_INET6        in6_addr=HIT_OF_NODE2
AF_INET6        in6_addr=IPv6_ADDRESS_OF_NODE2
AF_INET in_addr=0xc0249d6e (IPv4_ADDRESS_OF_NODE2)
HIT: 2001:0070:7484:0667:34ea:658b:ccbb:ef09
IP: 3ffe:0000:0000:0000:0000:0000:0000:0002
waiting to receive daemon info
88 bytes received
HIT: 2001:0070:7484:0667:34ea:658b:ccbb:ef09
IP: 192.36.157.110
waiting to receive daemon info
88 bytes received
HIP: AI_HIP set: remove IP addresses
Dumping the structure after removing IP addreses
AF_INET6        in6_addr=0x20 01 00 70 74 84 06 67 34 ea 65 8b cc bb ef 09
Input some text, press enter and ctrl+d
Hi from node1
!!!! conntest.c Connecting...
ai_flags 2048
ai_family 10
ai_socktype 1
ai_protocol6
ai_addrlen 28
ai_canonname (null)
Trying to connect to 2001:70:7484:667:34ea:658b:ccbb:ef09
After call conntest.c: connect to 2001:70:7484:667:34ea:658b:ccbb:ef09
connect ret=-1 errno=11
trying next
failed to connect


 It seems almost everything OK, at least it retrieves the HIT and the
addresses correctly... But, why does it remove all the ip address and tries
to connect *directly* to the HIT? Is that normal? Obviuosly when it tries to
connect to the HIT (as it was a *real* adddress), it fails.

 Another "problem" (maybe it's not and I'm more worried about the first
one) is if I delete the /etc/hip/hosts file, then it fails with:

Dumping the structure
AF_INET6        in6_addr=0x3f fe 00 00 00 00 00 00 00 00 00 00 00 00 00 02
AF_INET in_addr=0xc0249d6e ( 192.36.157.110)
HIP: AI_HIP set: remove IP addresses
GAI ERROR -2: Name or service not known
node1:~#

 It still retrieves correctly the data. Why is this second error caused by?


 Please, any clues/hints to get HIP working?
 Thank you very much! :)

/Jesús
Tired of trying to make HIP working... :S

--
Jesús Rojo Martínez.
Human Resource responsible BEST Stockholm - Kungliga Tekniska Högskolan
BEST - Board of European Students of Technology ( www.BEST.eu.org)

e-mail: jrojomartinez@xxxxxxxxx
phone: +46704369273
MSN: jrojomartinez@xxxxxxx

Other related posts: