- 论坛徽章:
- 0
|
本帖最后由 liu287545536 于 2015-04-08 11:49 编辑
使用一台linux主机虚拟的两台linux虚拟机进行多播试验。
两台虚拟机后端采用Host linux bridge连在同一个桥上
在虚拟机1里配置ip:
[root@dhcp71-229 ~]# ifconfig eth0 192.168.200.100
[root@dhcp71-229 ~]# 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:
[root@dhcp71-229 ~]# ifconfig eth0 192.168.200.101
[root@dhcp71-229 ~]# 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:
[root@dhcp71-229 ~]# 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:
[root@dhcp71-229 ~]# 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的情况:
[root@dhcp71-229 ~]# 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
...
不胜感激。
|
|