liu287545536 发表于 2015-04-08 11:48

请教一个 iperf 多播的问题

本帖最后由 liu287545536 于 2015-04-08 11:49 编辑

使用一台linux主机虚拟的两台linux虚拟机进行多播试验。
两台虚拟机后端采用Host linux bridge连在同一个桥上

在虚拟机1里配置ip:

#ifconfig eth0 192.168.200.100
# route
Kernel IP routing table
Destination   Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.200.1   0.0.0.0         UG    0      0      0 eth0
192.168.200.0   0.0.0.0         255.255.255.0   U   0      0      0 eth0

在虚拟机2里配置p:
#ifconfig eth0 192.168.200.101
# route
Kernel IP routing table
Destination   Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.200.1   0.0.0.0         UG    0      0      0 eth0
192.168.200.0   0.0.0.0         255.255.255.0   U   0      0      0 eth0


配置多播: 
虚1:
# iperf -s-c 235.0.0.2 -u -i 2
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:   224 KByte (default)
------------------------------------------------------------

虚2:
# iperf -u -B 192.168.200.101 -c 235.0.0.2 -t 10 -i 2

在虚2中输出上面命令后,理论上虚1应该有接收数据的统计,但是事实上却没有,一直处于上面虚1输出perf命令后的状态,看不到任何数据的接收。

为了check是不是虚1真的没有收到数据,我用tcpdump看了一下虚1的网口数据收发情况,奇怪的是,竟然有多播包的进出。
所以问题就来了,为什么这里的多播数据包,iperf没有统计到并输出呢?

附:
在虚2开启多播数据多发送时,tcpdump虚1的情况:
# tcpdump -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 byteseth0
07:45:40.503128 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.508195 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.519036 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.530418 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.552939 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.572878 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.584207 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.584216 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.590188 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
07:45:40.597982 IP 192.168.200.100.commplex-link > 230.0.0.2.commplex-link: UDP, length 1470
...


不胜感激。

liu287545536 发表于 2015-04-08 14:06

问题已经解决了,分享给以后遇到同样问题的朋友,只需要关掉server端的防火墙就ok了,忽然感觉自己好傻..𠹭呵

#iptables -F
页: [1]
查看完整版本: 请教一个 iperf 多播的问题