IPv6を使う他の方法(Debian+gogoNET その3)・・・一応接続成功

正しいクライアントは、gogoCLIENT で gogonet.gogo6.com からソースのアーカイブの形で持ってきます。(コンパイルの手間を省こうとしたのが tspc で嵌った原因でした・・・)

# tar xvfz gogoc-1_2-RELEASE.tar.gz

で展開します。

READMEをみると、依存関係がいろいろ書いてあるので、apt-get でインストールしました。

# apt-get install make
# apt-get install gcc
# apt-get install g++

で、いよいよコンパイルです。

va50j:~/gogoc-1_2-RELEASE# make platform=linux all
cd gogoc-tsp && make all
make[1]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-tsp’ に入ります
Building gogoCLIENT for platform linux …
Building gogoc-pal module …
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal’ に入ります
Setting up PAL for platform linux …
Building PAL objects for platform linux …
make[3]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform’ に入ります
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/common’ に入ります
gcc -c -O2 -I/root/gogoc-1_2-RELEASE/gogoc-pal/defs -Iinc -DPLATFORM=\”linux\” -D_REENTRANT -o /root/gogoc-1_2-RELEASE/gogoc-pal/objs/pal_version.o src/pal_version.c
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/common’ から出ます
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/unix-common’ に入ります
make[4]: `platform-obj’ に対して行うべき事はありません.
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/unix-common’ から出ます
make[3]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform’ から出ます

Creating libgogocpal.a PAL library for platform linux …
a – /root/gogoc-1_2-RELEASE/gogoc-pal/objs/pal_version.o

Copying PAL header files for platform linux …
make[3]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform’ に入ります
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/common’ に入ります
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/common’ から出ます
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/unix-common’ に入ります
make[4]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform/unix-common’ から出ます
make[3]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal/platform’ から出ます

make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-pal’ から出ます
Building gogoc-config module …
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-config’ に入ります
mkdir -p objs
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/namevalueparser.o src/namevalueparser.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/config.o src/config.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/namevalueconfig.o src/namevalueconfig.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/gogocvalidation.o src/gogocvalidation.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/gogocconfig.o src/gogocconfig.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/gogoc_c_wrapper.o src/gogoc_c_wrapper.cc
gcc -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/gogocuistrings.o src/gogocuistrings.c
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/haccess_devmap_c_wrap.o src/haccess_devmap_c_wrap.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/haccessdevicemappingconfig.o src/haccessdevicemappingconfig.cc
mkdir -p lib
ar cru lib/libgogocconfig.a objs/namevalueparser.o objs/config.o objs/namevalueconfig.o objs/gogocvalidation.o objs/gogocconfig.o objs/gogoc_c_wrapper.o objs/gogocuistrings.o objs/haccess_devmap_c_wrap.o objs/haccessdevicemappingconfig.o
ranlib lib/libgogocconfig.a
mkdir -p bin
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-config’ から出ます
Building gogoc-messaging module …
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-messaging’ に入ります
mkdir -p objs
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/ipcserver.o src/ipcserver.cc
src/ipcserver.cc: In member function ‘virtual bool gogocmessaging::IPCServer::WaitReady(long unsigned int)’:
src/ipcserver.cc:133: warning: suggest parentheses around assignment used as truth value
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/ipcclient.o src/ipcclient.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/servent.o src/servent.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/message.o src/message.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/messagesender.o src/messagesender.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/communicationsmgr.o src/communicationsmgr.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/clientmsgtranslator.o src/clientmsgtranslator.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/clientmsgsender.o src/clientmsgsender.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/servermsgtranslator.o src/servermsgtranslator.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/servermsgsender.o src/servermsgsender.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/clientmessengerimpl.o src/clientmessengerimpl.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/guimessengerimpl.o src/guimessengerimpl.cc
g++ -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/gogoc_c_wrapper.o src/gogoc_c_wrapper.cc
gcc -O2 -I. -I../gogoc-pal/out_inc -I../gogoc-pal/defs -Wall -D_REENTRANT -DNDEBUG -c -o objs/gogocuistrings.o src/gogocuistrings.c
mkdir -p lib
ar cru lib/libgogocmessaging.a objs/ipcserver.o objs/ipcclient.o objs/servent.o objs/message.o objs/messagesender.o objs/communicationsmgr.o objs/clientmsgtranslator.o objs/clientmsgsender.o objs/servermsgtranslator.o objs/servermsgsender.o objs/clientmessengerimpl.o objs/guimessengerimpl.o objs/gogoc_c_wrapper.o objs/gogocuistrings.o
ranlib lib/libgogocmessaging.a
mkdir -p bin
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-messaging’ から出ます
mkdir -p /root/gogoc-1_2-RELEASE/gogoc-tsp/objs
mkdir -p /root/gogoc-1_2-RELEASE/gogoc-tsp/bin
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-tsp/src/lib’ に入ります
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c base64.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/base64.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c cli.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/cli.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c config.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/config.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c lib.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/lib.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c log.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/log.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c md5c.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/md5c.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c buffer.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/buffer.o
gcc -O2 -Wall -I/root/gogoc-1_2-RELEASE/gogoc-tsp/platform/linux -I/root/gogoc-1_2-RELEASE/gogoc-tsp/include -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/out_inc -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-pal/defs -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-config -I/root/gogoc-1_2-RELEASE/gogoc-tsp/../gogoc-messaging -D_REENTRANT -c bufaux.c -o /root/gogoc-1_2-RELEASE/gogoc-tsp/objs/bufaux.o
bufaux.c:54:24: error: openssl/bn.h: そのようなファイルやディレクトリはありません
In file included from bufaux.c:55:
/root/gogoc-1_2-RELEASE/gogoc-tsp/include/bufaux.h:34: error: expected declaration specifiers or ‘…’ before ‘BIGNUM’
/root/gogoc-1_2-RELEASE/gogoc-tsp/include/bufaux.h:35: error: expected declaration specifiers or ‘…’ before ‘BIGNUM’
bufaux.c:84: error: expected declaration specifiers or ‘…’ before ‘BIGNUM’
bufaux.c: In function ‘buffer_put_bignum’:
bufaux.c:86: warning: implicit declaration of function ‘BN_num_bits’
bufaux.c:86: error: ‘value’ undeclared (first use in this function)
bufaux.c:86: error: (Each undeclared identifier is reported only once
bufaux.c:86: error: for each function it appears in.)
bufaux.c:96: warning: implicit declaration of function ‘BN_bn2bin’
bufaux.c: At top level:
bufaux.c:115: error: expected declaration specifiers or ‘…’ before ‘BIGNUM’
bufaux.c: In function ‘buffer_get_bignum’:
bufaux.c:131: warning: implicit declaration of function ‘BN_bin2bn’
bufaux.c:131: error: ‘value’ undeclared (first use in this function)
make[2]: *** [/root/gogoc-1_2-RELEASE/gogoc-tsp/objs/bufaux.o] エラー 1
make[2]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-tsp/src/lib’ から出ます
make[1]: *** [build-gogoc] エラー 1
make[1]: ディレクトリ `/root/gogoc-1_2-RELEASE/gogoc-tsp’ から出ます
make: *** [all] エラー 2
va50j:~/gogoc-1_2-RELEASE#

ということで、エラーになってしまいました。しょんぼり。でも、BIGNUMをキーワードに調べてみると、

# apt-get install libssl-dev

とするとよいという情報があったので、試してみたところ、無事に make が通るようになりました。

# make platform=linux installdir=/usr/local/gogoc install

とすると、あっさりインストールは成功しました。この場合、設定ファイルは /usr/local/gogoc/bin の下にあるものが使われるようで、デフォルトではAnonymousな接続になるようです。
で、起動してみます。

va50j:/usr/local/gogoc/bin# ./gogoc
gogoCLIENT v1.2-RELEASE build Feb 18 2011-03:14:49
Built on ///Linux va50j 2.6.26-2-686 #1 SMP Thu Jan 27 00:28:05 UTC 2011 i686 GNU/Linux///
Received a TSP redirection message from server anonymous.freenet6.net (1200 Redi).ction
The server redirection list is [ anon-amsterdam.freenet6.net, anon-taipei.freenet6.net, anon-montreal.freenet6.net ].
The optimized server redirection list is [ anon-taipei.freenet6.net, anon-montreal.freenet6.net, anon-amsterdam.freenet6.net ].

ということであっさり動作しました。早速、ifconfig で見てみます。

va50j:/usr/local/gogoc/bin# ifconfig
eth0 Link encap:イーサネット ハードウェアアドレス xx:xx:xx:xx:xx:xx
inetアドレス:192.168.x.xx ブロードキャスト:192.168.1.255 マスク:255.255.255.0
inet6アドレス: fe80::200:xxxx:xxxx:xxxx/64 範囲:リンク
UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1
RXパケット:28712 エラー:0 損失:0 オーバラン:41 フレーム:41
TXパケット:12941 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:1000
RXバイト:20038867 (19.1 MiB) TXバイト:2025306 (1.9 MiB)

lo Link encap:ローカルループバック
inetアドレス:127.0.0.1 マスク:255.0.0.0
inet6アドレス: ::1/128 範囲:ホスト
UP LOOPBACK RUNNING MTU:16436 メトリック:1
RXパケット:2321 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:2321 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:0
RXバイト:1143936 (1.0 MiB) TXバイト:1143936 (1.0 MiB)

tun Link encap:不明なネット ハードウェアアドレス 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6アドレス: 2001:xxx:xxxx:xxxx::xx:xxxx/128 範囲:グローバル
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1280 メトリック:1
RXパケット:6 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:0 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:500
RXバイト:416 (416.0 B) TXバイト:0 (0.0 B)

ということで、トンネルデバイスが無事に生成されました。
さらに、traceroute6 で見てみます。

va50j:/usr/local/gogoc/bin# traceroute6 www.kame.net
traceroute to www.kame.net (2001:200:dff:fff1:216:3eff:feb1:44d7), 30 hops max, 40 byte packets
1 2001:c08:xxxx:xxxx::xx:xxxx (2001:c08:xxxx:xxxx::xx:xxxx) 37.097 ms 38.083 ms 37.652 ms
2 2001:c08:xx:x::xxx:x (2001:c08:xx:x::xxx:x) 37.156 ms 36.605 ms 37.127 ms
3 2001:c08:xx::xx (2001:xxx:xx::xx) 38.393 ms 37.964 ms 37.471 ms
4 2001:288:xxx:x::x (2001:288:xxx:x::x) 36.975 ms 36.603 ms 37.433 ms
5 2001:c08:7f::21 (2001:c08:7f::21) 67.240 ms 66.780 ms 67.386 ms
6 2001:200:0:fe00::9c4:11 (2001:200:0:fe00::9c4:11) 69.532 ms 70.818 ms 74.719 ms
7 2001:200:0:1802:20c:dbff:fe1f:7200 (2001:200:0:1802:20c:dbff:fe1f:7200) 69.995 ms 70.116 ms 72.552 ms
8 ve42.foundry4.nezu.wide.ad.jp (2001:200:0:11::66) 72.891 ms 72.831 ms 72.275 ms
9 cloud-net1.wide.ad.jp (2001:200:0:1c0a:218:8bff:fe43:d1d0) 72.556 ms 72.521 ms 72.461 ms
10 2001:200:dff:fff1:216:3eff:feb1:44d7 (2001:200:dff:fff1:216:3eff:feb1:44d7) 72.831 ms 72.773 ms 72.737 ms
va50j:/usr/local/gogoc/bin#

ということで、無事につながりました。

・・・が、再起動して、無線APの下に移動(同時にクラスCの固定プライベートアドレスからクラスBのDHCPアドレスに移動)したら、つながらなくなっちゃいました。(泣)

・・・なんてことになって、しょんぼりしながらこの日記をここまで書いた後、改めて試してみたら何故かつながって、www.kame.netに接続したら無事に亀が踊りました。時計が結構ずれてたからなにか関係あるのかな??
とにかくよくわかりません・・・(泣)

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)