组播的问题
两个机顶盒处于同一局域网内,
设置成相同的静态IP,
另有一服务器发送组播流,
这个两个盒子能够正常接收到组播流吗?
盒子只能播放组播,无其他需求。
请高手解析一下原因
IP Address:
We want to operate without a DHCP server and would like that all STB's assigned themselves an IP address from the link-local range 169.254.0.0/16 according to RFC3927 http://tools.ietf.org/html/rfc3927. We have made some tests that suggest that Linux based STB's connected to the same IGMP aware switch can even have the same IP address.
If implementation of the full RCF3927 is not possible we want all STB's to have the following IP address:
STB has preconfigured IPv4 address 169.254.44.88/16 STB has preconfigured multicast route "route add -net 224.0.0.0 net mask 240.0.0.0 dev eth0" on the assumption that your STB runs Linux.
[解决办法]
如果是单播,需要ARP解析,那可能会出现混乱,把IP包发给机顶盒1或机顶盒2都不一定,那哪个机顶盒回应了ARP请求。这种情况肯定要避免IP冲突了。
对于组播:
IGMP aware switch 是可以解析上层的IGMP消息的二层设备。当switch从某二层端口收到机顶盒发来的经过该switch的消息说机顶盒要加入哪个group的时候,switch就记下该group的组播地址还有该二层端口(和机顶盒的MAC地址对应)。两个机顶盒都是这样。
那么当有组播数据包到来时,switch 一查,有某个二层端口加入了该组播group,那就把组播数据通过该二层端口发出去,当然,通道某个希望接受该组播的机顶盒。
这样可以绕过机顶盒IP地址的解析。如果系统(机顶盒的linux)检测到IP冲突还继续工作的话,那可以。
- 千里孤行