DTCP Client -- dtcpc

Daemon Mode

To establish an IPv6 over IPv4 tunnel permanently, it is useful to use daemon mode of dtcpc.

When you run dtcpc as daemon mode, you may don't want to specify your password at each invoking of dtcpc. You can save your password into /usr/local/etc/dtcpc.auth (/usr/pkg/etc/dtcpc.auth if you installed the dtcp using pkgsrc). The format is:

servername:username:password
For example, if DTCP server is dtcp.example.org, username is hoge and password is fugafuga, it should be:
dtcp.example.org:hoge:fugafuga
Since dtcpc.auth has password in it, set the mode to prevent it from being referred from other than root like:
chmod 600 /usr/local/etc/dtcpc.auth
The option to run dtcpc as daemon mode is -D. If -l option is also specified, dtcpc will try to reconnect automatically when a connection is dropped.

So, a command line will be like follows:

dtcpc -t network -u hoge -D -l dtcp.example.org
Server: dtcp.example.org
User: hoge (-u)
Network tunnel type (-t)
As a daemon (-D)
Reconnect automatically (-l)
If you installed dtcp from the FreeBSD ports, /usr/local/etc/rc.d/dtcpc.sh is installed. Since if you installed dtcp from the NetBSD pkgsrc, /usr/pkg/etc/rc.d/dtcpc is installed, please copy it into /etc/rc.d. In these cases, to invoke dtcpc at boot, add following three lines into /etc/rc.conf:
dtcpc_enable="YES" dtcpc_server="dtcp.example.org" dtcpc_username="hoge"
The default of dtcpc_flags is `-t network -Dl'. If you want to do prefix delegation, please set it appropriately.

If you installed the rc script for NetBSD, above are also applicable for NetBSD.


All Rights Reserved, Copyright (C) 2004 Hajimu UMEMOTO
Last Modified Jun 8, 2004
ume@mahoroba.org