在具有多个网络接口的Windows 8 / 8.1上发送多播UDP数据报时出现问题 [英] Problem sending multicast UDP datagram on Windows 8 / 8.1 with multiple Network Interface

查看:79
本文介绍了在具有多个网络接口的Windows 8 / 8.1上发送多播UDP数据报时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我尝试使用多播地址和端口,如224.1.2.3:12345。



我设法创建了监听器部分,为了使它能够与Windows 8及其多个网络板一起使用,我必须指定使用哪个网络接口。

如果我尝试使用ANYADDR ,我的程序没有收到其他PC发送的数据报。



但现在,我的问题是从Windows 8及其Hyper发送来自PC的数据报-V,我在那台PC上有多个网络接口。



在调用sendto之前,我已经尝试将我的传出套接字绑定到本地接口,但没有成功。



我也尝试设置SO_DONTROUTE选项,SO_BROADCAST。



你有什么想法吗?

Windows配置?

...



谢谢。



编辑:我禁用了其中一个Hyper-V虚拟网络接口以仅保留真实接口,但没有任何变化,我仍然无法向任何人发送多播数据报(甚至本身)

Hi everyone

I try to use a Multicast Address and port like 224.1.2.3 : 12345.

I manage to create the listener part, to make it worked with the Windows 8 and its multiple network board, I had to specify which network interface is used.
If I try to use the ANYADDR, my program is not receiving the datagram sent by the other PC.

But now, my problem is to send those Datagram from the PC with Windows 8 and with its Hyper-V, I have multiple network interface on that PC.

I already tried to bind my outgoing socket to the local interface before calling sendto without success.

I also tried to set SO_DONTROUTE option, SO_BROADCAST.

Do you have any idea ?
Windows Configuration ?
...

thanks.

I disabled one of the Hyper-V virtual network interface to keep only the "real" interface, but nothing change, I still cannot send Multicast Datagram to anyone (even itself)

推荐答案

这似乎是按设计。这是一个解决方案。



http://vbry21.wordpress.com/2012/07/03/fixed-in-a-tick-solving-mulicast-issues-in-hyper -v-vms / [ ^ ]
This seems to be "by design". Here's a work-around.

http://vbry21.wordpress.com/2012/07/03/fixed-in-a-tick-solving-mulicast-issues-in-hyper-v-vms/[^]


阅读本文时:在Windows 8和Windows Server 2012中运行多播接收器应用程序时数据报丢失 [ ^ ]



我找到了BFE服务(基本过滤引擎) )。



停止此服务,一切正常。



现在我需要配置此服务不过滤我的多播数据报。



可以添加(从中提取)文章):

a REG_MULTI_SZ 类型的注册表项,名为 UdpExemptPortRange ,用于配置免除基本过滤引擎的端口范围。为此,请在以下路径中创建注册表项: HKEY_LOCAL_MACHINE \System\CurrentControlSet \services\Tcpip\Parameters\
While reading this article : Datagram loss when you run a multicast receiver application in Windows 8 and in Windows Server 2012[^]

I found the BFE Service (Base Filter Engine).

Stopping this Service, and all works fine.

Now I need to configure this service to not filter my multicast datagram.

May be by adding (extract from the article):
a REG_MULTI_SZ type registry key named UdpExemptPortRange to configure the port ranges that are exempted from the base filtering engine. To do this, create the registry key in the following path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\services\Tcpip\Parameters\


要使用多播,您必须在网络上的某处具有IGMP查询器。它可以是硬件(包含在某些交换机或路由器中)或软件。



我已将自己的IGMPQuerier作为Windows软件。另一个可在谷歌上查看



但有时候1个查询器是不够的(TTL太短?)。在我的情况下,我在每一侧放置了2个查询器(具有多播侦听组/端口的PC,以及发送到多播组/端口的PC),现在一切正常。
To use Multicast, you must have a IGMP Querier somewhere on the network. It can be hardware (included in some switch or router) or software.

I have made my own IGMPQuerier as a Windows Software. an other one is available on google

but sometimes 1 querier is not enough (too short TTL ?). In my case, I put 2 queriers on each side (the PC with the multicast listening group/port, and the PC sending to the multicast group/port) and everything work fine now.


这篇关于在具有多个网络接口的Windows 8 / 8.1上发送多播UDP数据报时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆