首页 > 解决方案 > 从eclipse启动tunslip6时无法访问节点

问题描述

我有一个连接到我的网络的 Java 应用程序。我正在尝试将消息发送回我的网络中的节点(以建立会话密钥),但是当 Java 应用程序中的线程启动 tunslip6 时,无法将消息发送到网络(使用 ping6 测试)。

什么有效

通过命令行启动 tunslip6 并通过命令行 ping 节点:

sudo ../../contiki/tools/tunslip6 -s /dev/ttyUSB0 aaaa::1/64 -v5
********SLIP started on ``/dev/ttyUSB0''
opened tun device ``/dev/tun0''
ifconfig tun0 inet `hostname` mtu 1500 up
ifconfig tun0 add aaaa::1/64
ifconfig tun0 add fe80::0:0:0:1/64
ifconfig tun0

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:127.0.1.1  P-t-P:127.0.1.1  Mask:255.255.255.255
          inet6 addr: aaaa::1/64 Scope:Global
          inet6 addr: fe80::8c0d:d6ad:7ead:ef16/64 Scope:Link
          inet6 addr: fe80::1/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

*** Address:aaaa::1 => aaaa:0000:0000:0000
Got configuration message of type P
Setting prefix aaaa::
Server IPv6 addresses:
 aaaa::212:4b00:615:a4a4
 fe80::212:4b00:615:a4a4

然后我可以 ping aaaa::212:4b00:615:a4a4 并在浏览器中访问邻居列表。

什么不起作用

生成一个启动 tunslip6 的线程(使用 Java 项目)成功:

ifconfig tun0 inet `hostname` mtu 1500 up
ifconfig tun0 add aaaa:1/64
ifconfig tun0 add fe80::0:0:0:1/64
ifconfig tun0

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:127.0.1.1  P-t-P:127.0.1.1  Mask:255.255.255.255
          inet6 addr: fe80::1/64 Scope:Link
          inet6 addr: fe80::e831:a2b0:1f6b:e49a/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Packet from TUN of length 48 - write SLIP
0000 60 00 00 00 00 08 3a ff fe 80 00 00 00 00 00 00 e8 31 a2 b0 1f 6b e4 9a ff 02 00 00 00 00 00 00 00 00 00 00 00 00 00 02 85 00 ee 4e 00 00 00 00

Got configuration message of type P

Setting prefix ::

Server IPv6 addresses:

 ::212:4b00:615:a4a4

 fe80::212:4b00:615:a4a4

但随后无法 ping 边界路由器(在 ::212:4b00:615:a4a4 下)或以其他方式向网络发送消息。

怀疑

标签: eclipsecontiki

解决方案


推荐阅读