The comman line is like follows:
dtcpclient -t network -u hoge -d dtcp.example.orgWhen you excute dtcpclient, you are asked your password. Answer it.Server: dtcp.example.org
User: hoge (-u)
Network tunnel type (-t)
Debug output (-d)
When connection is established, a tunnel should be established and an IPv6 default route should be set up toward a tunnel. The following is an example outout under FreeBSD:
A tunnel and routes are configured by /usr/local/etc/dtcpclient.script. You can configure this behavior by editing /usr/local/etc/dtcpclient_script.conf. Since dtcpclient_script.conf is not installed by default, please create it if necessary. Please refer the comment in dtcpclient.script for configuration items.ume@cheer:1003% ifconfig gif0 gif0: flags=8051mtu 1280 tunnel inet 218.45.20.185 --> 210.161.150.9 inet6 fe80::240:c7ff:fe99:81eb%gif0 prefixlen 64 scopeid 0x4 ume@cheer:1004% netstat -rnfinet6 | grep gif0 default ::1 UGSc gif0 fe80::%gif0/64 link#4 UC gif0 fe80::240:c7ff:fe99:81eb%gif0 link#4 UHL lo0 ff02::%gif0/32 link#4 UC gif0
You can use your favorite tunnel interface by setting `tunif' variable
in dtcpclient_script.conf.
The valude is `gif' under FreeBSD by default. That is, a gif
interface will be created on demand to be used.
The setting of `tunif' is ignored under MacOSX. The dtcpclient_script
searches a gif interface which is ready to use then use it, instead.
The default is `gif0' under other OSs than above.
If you don't want the behavior that an IPv6 default route is set up automatically, specify appropriate routes by static_routes in dtcpclient_script.
The dtcpclient doesn't set sysctl automatically, like the dtcpc does. To configure your box as a router, please set following mibs separately:
net.inet6.ip6.forwarding=1For example, you can put following two lines into /etc/rc.conf under FreeBSD:
net.inet6.ip6.accept_rtadv=0
ipv6_enable="YES"Or, please put following line into /etc/rc.conf under NetBSD:
ipv6_gateway_enable="YES"
ip6mode="router"
The dtcpclient doesn't set an IPv6 global address up automatically with above settings. If you know a prefix delegated from a server. you can set it up statically. Or, please refer Configuring Prefix Delegetion.