测试多播路由的工具

测试多播路由的工具

我正在寻找一个可以在标准操作系统(Windows 或 Linux)上运行的简单好用的工具,可以用它来测试路由器是否正确传递多播。

一位客户要求在作为路由器的 Linux 机器上启用多播路由,因为他们的电话系统需要多播了解一些功能。由于我并不在客户端附近,所以我实际上没有能力尝试在 Linux 上设置多播路由的各种方法。我可以在我的办公桌上设置一个与部署在他们网络上的路由器相同的路由器,但我不知道有什么好的简单工具可以用来生成或监听多播流量。

我发现的一个多播工具是mcast.exe 工具它是 Windows 2000/2003 资源工具包的一部分。从我在网上读到的内容来看,mcast.exe 似乎无法跨路由器工作,只能在本地网络上工作,因此它似乎对我测试多播路由没有用。

那么您使用什么工具来测试多播路由是否正确设置?

答案1

没有太多现实世界的多播经验,但是你见过吗mz

Description: versatile packet creation and network traffic generation tool
 mausezahn (mz) is a fast traffic generator written in C which allows you to
 send nearly every possible and impossible packet. It is mainly used to test
 VoIP or multicast networks but also for security audits to check whether
 your systems are hardened enough for specific attacks.
 Mausezahn can be used for example:
 .
  * as traffic generator (e.g. to stress multicast networks);
  * to precisely measure jitter (delay variations) between two hosts
    (e.g. for VoIP-SLA verification);
  * as didactical tool during a datacom lecture or for lab exercises;
  * for penetration testing of firewalls and IDS;
  * for DoS attacks on networks (for audit purposes of course);
  * to find bugs in network software or appliances;
  * for reconnaissance attacks using ping sweeps and port scans;
  * to test network behaviour under strange circumstances (stress test,
    malformed packets, ...).
Homepage: http://www.perihel.at/sec/mz/

还有ssmping

Description: check your multicast connectivity
 Tools to check whether you can receive Source Specific Multicast (SSM)
 or Any Source Multicast (ASM) via either IPv4 or IPv6
 .
 If a host runs ssmpingd, users on other hosts can use the ssmping client
 to test whether they can receive SSM from the host. Another program
 called asmping is also provided to check whether can receive ASM.
Homepage: http://www.venaas.no/multicast/ssmping/

两者都可以在 Ubuntu 10.10 上安装。祝你好运!

答案2

iperf 非常适合此用途,并且可用于大多数 Linux 发行版和 Windows。

在听众方面:

% iperf -s -u -B 224.1.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 224.1.1.1
Joining multicast group  224.1.1.1
Receiving 1470 byte datagrams
UDP buffer size:  110 KByte (default)
------------------------------------------------------------

...它会等待从源头收到消息。在源头上,开始发送:

% iperf -c 224.1.1.1 -u -T 32 -t 3 -i 1
------------------------------------------------------------
Client connecting to 224.1.1.1, UDP port 5001
Sending 1470 byte datagrams
Setting multicast TTL to 32
UDP buffer size:  110 KByte (default)
------------------------------------------------------------
[  3] local 192.168.220.20 port 59347 connected with 224.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec   129 KBytes  1.06 Mbits/sec
[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  0.0- 3.0 sec   386 KBytes  1.05 Mbits/sec
[  3] Sent 269 datagrams

同时,你会看到监听器接收到了流量:

...
[  3] local 224.1.1.1 port 5001 connected with 192.168.220.20 port 59347
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec   128 KBytes  1.05 Mbits/sec   0.035 ms    0/   89 (0%)
[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec   0.015 ms    0/   89 (0%)
[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec   0.025 ms    0/   89 (0%)
[  3]  0.0- 3.0 sec   386 KBytes  1.05 Mbits/sec   0.068 ms    0/  269 (0%)

通过在发送方上指定-T 32选项,您将 TTL 设置为 32,这将确保流量可以被路由(假设路由器上的 IGMP、PIM 等配置正确)

顺便说一句,上次我尝试在这种情况下使用 VLC 时,遇到了一个问题,即 VLC 会忽略 TTL 设置并始终传输 TTL 设置为 1 的数据包。请阅读错误报告寻求解决方法。

答案3

这可能有用也可能没用,但过去我曾使用 VLC(尤其是 VLC)作为多播视频源。不过,在我的用例中,多播流从来不需要超出 L2 域,所以我不能说它生成的流量是否是“适当的”可路由多播。

答案4

您还可以尝试以下应用程序:VIC 和 RAT,以前为 MBONE 开发的多播应用程序,适用于 Windows XP 和 UNIX。它还支持 IPv4 和 IPv6 多播。您可以在以下位置查看它们http://mediatools.cs.ucl.ac.uk/nets/mmedia/

相关内容