Testing a HIP connection with an IPv6 application

You can test HIP with any networking application, but in this section we will demonstrate few development-oriented test applications.

You should run conntest-client-hip and conntest-server with root privileges if conntest-server port number is less than 1024.

In this section we will use ipv6 addresses, but you can use also ipv4 addresses. Furthermore, the use of hipfw is optional.

oops:

Crash will act as the connection initiator, so we need to configure the hosts files of crash:

crash:

This will setup a HIP connection between the two hosts (it may take a while if you are using virtual machines). You should replace HIT_OF_XXX with the HIT of the host XXX. The hip daemon loads (and creates if necessary) the host identities from /etc/hip automatically. If you want to know the HIT of the localhost, run "hipconf get hi default". To avoid routing problems especially with UDP, it is highly recommend to use the default HIT of the machine! You can list all HITs of the machine with "hipconf get hi all", but it is safe to use the optional HITs only with TCP connections!

Mappings between HITs and IP addresses are usually set up automatically with the hosts files. Manual configuration is also possible but not necessary:

tools/hipconf add map PEER_HIT PEER_IP

You can also add the mapping to "/etc/hip/hipd_config" and restart hipd. It is also possible to use DNS or OpenDHT (Chapter 21, OpenDHT Support (Experimental!)) for the mappings.

Link local IPv6 addresses are not supported well, so do not use them. Use global IPv6 addresses instead for testing. The reason for this is that it is hard to know if the peer belongs to the same local network as we are or not.