Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Good UTC evening!

I've created a tap0 device on my host, it looks like:

tap0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 92:80:f9:b0:1e:fd  txqueuelen 500  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I have virtual machine running on the host, its interface put into bridge mode with tap0 (macvtap0 is created on the host). But while i try to connect to the host from withing the guest, no packets are being exchanged. There's no arp packets seen on tap0.

I believe I'm doing something terribly wrong, but cannot understand what…

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You should add this tap device to your bridge device.

  1. Found your bridge device name via command brctl show
  2. Add your tap to the very bridge via sudo brctl addif <your-bridge-device-name> tap0
share|improve this answer
    
Thank you! I've removed my manually created tap0, set in the virt-manager the "shared device" to br0 — an empty bridge i've created. Upon guest start a vnet0 has been created on my host, and also it has been added to the bridge. Now it works as i wanted. But one thing i still don't understand why it didn't work with the previous setup? I wanted to have a tap0 device, which should have received the packets from the guest. –  Pooh Oct 13 '13 at 6:18
    
the tap device will be created automatically when creating new domain of libvirt, then add it to the bridge you expected. If you use your own tap device, you have to add your own tap device to any bridge device to get frames. –  shawnzhu Oct 13 '13 at 12:36
    
So why doesn't it work without the bridge? With only the tap device the packets are instructed to go to? That's the question... –  Pooh Oct 13 '13 at 13:40
    
It depends on the networking configuration of your KVM domain. use virsh dumpxml <your-domain-name> and use libvirt.org networking as reference. Technically TAP device simulates as layer 2 device which receive/send frames. So you need kind of IPC to send out and pass frames (bridge is an example). single TAP device can not communicate with external network interface. However, you can use macvtap to send frames to a number of devices without host bridge. –  shawnzhu Oct 13 '13 at 14:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.