vsomeip-library - 使用服务发现时 IPv4 和 IPv6 之间的不同行为

问题描述 投票:0回答:1

设置:

  • vsomeip 3.3.8
  • 通过网络交换机连接两台 Xenomai 机器(Debian 11)
  • 两台设备上的“镜像服务”。在节点 1 上提供服务 4433.2211 并请求服务 1234.5678。节点 2 执行相反的操作。

观察:

  • 使用 IPv4 地址运行应用程序会产生预期的行为。两个应用程序交换数据。
  • 使用 IPv6 地址运行相同的应用程序并停用服务发现和各个客户端的硬编码 IPv6 地址,成功运行。这表明我的计算机能够使用 IPv6 进行通信
  • 问题:使用主动服务发现(没有硬编码服务的单播地址),两个应用程序之间没有通信(注意:Wireshark 显示服务发现通信)
    • 我注意到 Wireshark 显示一条 ICMPv6 消息,其中显示“多播地址记录已更改为排除:ff0e::1”。这是我不明白的事情,因为我没有要求排除该地址。

问题

有谁知道为什么节点不通信?我需要设置任何特定于 IPv6 的内容吗?

  • 我认为它应该位于 C++ 应用程序之外的某个地方。应该和我的Xenomai网络设置有关。或者json配置文件

附录:节点1的json配置文件和日志

我的 节点 1 的 json 文件:

{
"unicast" : "4242::1",
"logging" :
{
"level" : "trace",
"console" : "true",
"file" : { "enable" : "true", "path" : "/usr/cppPlayground/requestResponse2DevicesIpv6/node1.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "request-response",
"id" : "0x1"
}
],
"services" :
[
{
"service" : "0x4433",
"instance" : "0x2211",
"unreliable" : "30510"
}
],
"routing" : "request-response",
"service-discovery" :
{
"enable" : "true",
"multicast" : "ff0e::1",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "10",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}

我的 节点 2 的 json 文件:

{
"unicast" : "4242::2",
"logging" :
{
"level" : "trace",
"console" : "true",
"file" : { "enable" : "true", "path" : "/usr/CppPlayground/requestResponseMirrored2DevicesIpv6/node2.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "request-response-mirrored",
"id" : "0x9"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unreliable" : "30509"
}
],
"routing" : "request-response-mirrored",
"service-discovery" :
{
"enable" : "true",
"multicast" : "ff0e::1",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "10",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}

节点 1 的日志文件(在节点 2 之后启动):

2023-09-15 15:35:21.279421 [info] Using configuration file: "vsomeip-local_IPv6.json". 2023-09-15 15:35:21.281261 [info] Parsed vsomeip configuration in 2ms 2023-09-15 15:35:21.281666 [info] Configuration module loaded. 2023-09-15 15:35:21.282017 [info] Initializing vsomeip (3.3.8) application "request-response". 2023-09-15 15:35:21.282568 [info] Instantiating routing manager [Host]. 2023-09-15 15:35:21.283269 [info] create_routing_root: Routing root @ /tmp/vsomeip-0 2023-09-15 15:35:21.283987 [info] Service Discovery enabled. Trying to load module. 2023-09-15 15:35:21.285998 [info] Service Discovery module loaded. 2023-09-15 15:35:21.286556 [info] Application(request-response, 0001) is initialized (11, 100). 2023-09-15 15:35:21.287161 [info] Starting vsomeip application "request-response" (0001) using 2 threads I/O nice 255 2023-09-15 15:35:21.287993 [info] Client [0001] routes unicast:4242::1, prefix:24 2023-09-15 15:35:21.287908 [info] main dispatch thread id from application: 0001 (request-response) is: 7f6d7edde700 TID: 1378 2023-09-15 15:35:21.288016 [info] shutdown thread id from application: 0001 (request-response) is: 7f6d7e5dd700 TID: 1379 2023-09-15 15:35:21.289400 [info] Watchdog is disabled! 2023-09-15 15:35:21.290087 [info] REQUEST(0001): [1234.5678:255.4294967295] 2023-09-15 15:35:21.290180 [info] io thread id from application: 0001 (request-response) is: 7f6d7d5db700 TID: 1381 2023-09-15 15:35:21.290169 [info] io thread id from application: 0001 (request-response) is: 7f6d7fedcec0 TID: 1375 2023-09-15 15:35:21.290694 [info] create_local_server: Listening @ /tmp/vsomeip-1 2023-09-15 15:35:21.292821 [info] OFFER(0001): [4433.2211:0.0] (true) 2023-09-15 15:35:21.293393 [info] vSomeIP 3.3.8 | (default) 2023-09-15 15:35:21.293815 [info] Network interface "eno1" state changed: up 2023-09-15 15:35:21.294766 [info] Route "ff00::/8 if: eno1 gw: n/a" state changed: up 2023-09-15 15:35:21.295200 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490 2023-09-15 15:35:21.295432 [debug] **Joining to multicast group ff0e::1 from 4242::1** 2023-09-15 15:35:21.295805 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30510 2023-09-15 15:35:21.295976 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490 2023-09-15 15:35:21.296000 [info] SOME/IP routing ready. 2023-09-15 15:35:22.293609 [info] OFFER(0001): [4433.2211:0.0] (true) 2023-09-15 15:35:22.294419 [warning] routing_manager_impl::handle_local_offer_service: Application: 0001 is offering: [4433.2211.0.0] offered previously by itself. 2023-09-15 15:35:23.294958 [info] OFFER(0001): [4433.2211:0.0] (true) 2023-09-15 15:35:23.295723 [warning] routing_manager_impl::handle_local_offer_service: Application: 0001 is offering: [4433.2211.0.0] offered previously by itself. *[... all the same as the two messages before...]* 2023-09-15 15:35:29.039199 [info] STOP OFFER(0001): [4433.2211:0.0] (true) 2023-09-15 15:35:29.039906 [info] RELEASE(0001): [1234.5678] 2023-09-15 15:35:30.304243 [info] Stopping vsomeip application "request-response" (0001).
我对 IPv6 执行了与 IPv4 类似的步骤。

    将多播地址路由到以太网设备:
  1. sudo ip -6 route add ff0e::1 dev eno1
    
    
  2. 在两个节点上启动各自的应用程序:
  3. env VSOMIP_CONFIGURATION...
    
    
这样,我期望得到与 IPv4 相同的行为。当然,我尝试了很多与网络配置相关的其他内容,但与提到的方法没有什么不同。

linux ipv6 vsomeip
1个回答
0
投票
这是vsomeip 3.3.8 中的一个错误。它不支持 IPv6 的服务发现。前一段时间提出了一个拉取请求。不幸的是,当我搜索相关关键字时,github搜索并没有突出显示

pull-request...

© www.soinside.com 2019 - 2024. All rights reserved.