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.

I have several KVMs and using public bridge mode. VMs can talk to each other but VMs can't access real network and the host can't reach VMs. One weird thing is that it used to work before and it doesn't work anymore.

The environment is following: Host - with static IP and has 4 ethernet card but only eth1 is connected to the network. I created br0, and put the IP to br0 and eth1 doesn't have an IP. Tap devices are pre-created, and I issue following commands to do that

tunctl -t ${tapname}
ip link set dev ${tapname} up
brctl addif br0 ${tapname}

Then I enable IP forwarding on host and add route to the guest

route add -host ${guestIP} ${tapname}

In the guest machines, I set the IP manually and add route to host and set it to be the gw. (I tried without this and doesn't work either)

And this is the command I use to start VM.

qemu-system-x86_64 ${OPTIONS} -net nic,model=virtio,macaddr=${MAC} -net tap,ifname=${tapname},script=no

Could anyone please help me to figure out what I am doing wrong?

Thanks,

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.