eclipse - 从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 下)或以其他方式向网络发送消息。
怀疑:
- 我怀疑这是有权限的东西。ping6 说“网络无法访问”,而不是关于权限。
- 某些东西不适用于设置前缀。尽管命令 (
./tunslip6 -s /dev/ttyUSB0 aaaa:1/64 -v5
) 相同,但前缀的 tunslip 输出不同。 - 会不会是日食做了不应该做的事情?
解决方案
推荐阅读
- typescript - TypeScript 从参数推断泛型类
- mysql - 在不使用类型的情况下删除 SQL 查询中的查询
- wordpress - WordPress 升级失败。管理面板不工作
- mongodb - 如何在 mongodb 查询中检查 if 条件中的空数组?
- javascript - 如何计算和显示来自javascript对象的字段总和
- sql - perl - 比较来自 2 个数据库的两个 SQL 查询的两列
- python - 如何通过 Python 使用 GeckoDriver 和 Firefox 使 Selenium 脚本无法检测?
- batch-file - 使用 ffmpeg 将任何扩展名的文件转换为 MP4
- javascript - 如何使您的复选框与您的 Jquery 功能一起使用?
- android - 当 Json root 不是数组而是对象时如何解析 JSON 数据,反之亦然,基于不同的 url?