Linux 上的多播

发布于 2024-08-10 03:59:08 字数 1345 浏览 11 评论 0原文

我正在 Linux 上测试一个简单的多播应用程序。我通过执行以下操作在我的电脑上运行它:

  • 禁用防火墙
  • 运行命令route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

如果您对详细信息感兴趣,请参阅这篇帖子

为什么需要这两个步骤?有没有替代方案。

我正在本地主机上测试代码。

在另一台电脑上,我尝试在禁用防火墙后运行该程序。它不起作用。 当我运行路线命令时,我收到以下消息

route: netmask 0fffffff doesn't make sense with host route
Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables
   route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.

   route {-h|--help} [<AF>]              Detailed usage syntax for specified AF.
   route {-V|--version}                  Display version/author and exit.

    -v, --verbose            be verbose
    -n, --numeric            don't resolve names
    -e, --extend             display other/more information
    -F, --fib                display Forwarding Information Base (default)
    -C, --cache              display routing cache instead of FIB

<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) 
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) 
x25 (CCITT X.25) 

解决方案是什么?

I am testing a simple multicast application on linux. I got it working on my pc by doing the following:

  • disabling the firewall
  • running the command route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

if you are interested in the details, see this post

why are these two steps required? is there an alternative.

i am testing the code on localhost.

on another pc I tried running the program after disabling the firewall. it did not work.
when I run the route command I get the following message

route: netmask 0fffffff doesn't make sense with host route
Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables
   route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.

   route {-h|--help} [<AF>]              Detailed usage syntax for specified AF.
   route {-V|--version}                  Display version/author and exit.

    -v, --verbose            be verbose
    -n, --numeric            don't resolve names
    -e, --extend             display other/more information
    -F, --fib                display Forwarding Information Base (default)
    -C, --cache              display routing cache instead of FIB

<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) 
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) 
x25 (CCITT X.25) 

what is the solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沉溺在你眼里的海 2024-08-17 03:59:08

让它在没有路由命令的情况下工作。
只是一些防火墙配置问题。

我看到这个建议使用路由命令在多播地址上运行 ping。这里不需要。

got it to work without the route command.
just some firewall configuration problem.

i saw this recommendation to use route command for running ping on a multicast address. it is not required here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文