ARP WORKS ONLY IN ONE WAY
everyone. I have encountered a problem and I am looking for your help.
I have been trying to run a Red Hat 6.3 in qemu and make its network work.
This time I want to use the VT-d mechanism.
I have two NIC in my computer, eth2 and eth3. I build the virtual function
from the physical function and give the vf to qemu. The specific info is
as follows:
The pf:
8: eth3: mtu 1500 qdisc noop state DOWN qlen 1000 link/ether
00:90:fa:10:35:0e brd ff:ff:ff:ff:ff:ff vf 0 MAC 00:90:fa:29:4c:13, tx
rate 90 (Mbps)
9: eth2: mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:90:fa:10:35:10
brd ff:ff:ff:ff:ff:ff vf 0 MAC 00:90:fa:ae:82:04, tx rate 90 (Mbps)
The vf:
3: eth4: mtu 1500 qdisc noop state DOWN qlen 1000 link/ether
00:90:fa:29:4c:13 brd ff:ff:ff:ff:ff:ff
4: eth3: mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:90:fa:ae:82:04
brd ff:ff:ff:ff:ff:ff
As you can see, vf eth3 in qemu corresponds to pf eth2 in my computer, and
vf eth4 in qemu corresponds to pf eth3 in my computer.
I have tried to plug in and plug out the network cable to test whether the
vf will detect the change. The thing is, the vf works well. Every time I
plug out the network cable, ethtool eth3/4(3 or 4 depends on which cable I
plug out) tells me that "Link detected: no". And every time I plug the
cable back, and rerun ethtool, I get "Link detected: yes".
Then I began to configure the network. I choose the pf eth2 and its
corresponding vf eth3. I use "ifconfig eht2 192.168.1.1/24 up" to config
pf and "ifconfig eth3 192.168.1.3/24 up" to config the vf. Then I ping and
find that it does not work!
I have checked that the iptables have not banned my network.
Here is something I find that may be the root cause. After I ping from vf
to pf, I check the arp tables and find this:
arp tables in virtual machine:
? (192.168.1.1) at on eth3
arp tables in my computer:
? (192.168.1.3) at 00:90:fa:ae:82:04 [ether] on eth2
According to my opinion, arp works in this way: it first send a broadcast
to ask what is the corresponding MAC address of the IP address. The node
that has the specific IP address will send a package back. Thus they both
know each other's MAC address. From the arp tables above, it seems that
the broadcast works well thus the arp table in my computer find the MAC of
the vf. However, the "sending a package back" thing does not work. Thus
the arp table in virtual machine does not know the MAC of the pf.
Do anybody know the reason?
Orz.
No comments:
Post a Comment