Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-05-2009, 01:36 AM   #1
LQ Newbie
Registered: Oct 2008
Posts: 10

Rep: Reputation: 0
Question arghh! One interface works and one doesn't in kvm virtual machine

I have a host machine with 2 ethernet cards on two different subnets. I've set up bridges for both of them:
host> brctl show
bridge name bridge id STP enabled interfaces
br0 8000.003048c655e0 no vnet7
br1 8000.003048c655e1 no vnet6
virbr0 8000.000000000000 yes
In my virtual machines I've connected one virtual ethernet card to br0 and the other to br1. The problem is that only eth1 (in the virtual machine) that is connected to br0 on the host works fully. eth0 that is connected to br1 does not work. I can't connect to machine on the same subnet. I can ping them, but I can't open a tcp connection:

vm> telnet d2 25
telnet: connect to address Connection refused
telnet: Unable to connect to remote host: Connection refused
I can tell from tcpdump that the target machine does not see anything from the vm besides an arp request.

The problem is the same in the opposite direction. I can ping the vm from an entirely different network, but if I try to telnet to it tcpdump shows me that the vm never sees anything.

So the question is why does one virtual ethernet card work and not the other? On the host I compared the files in /proc/sys/net/ipv4/conf and they are exactly the same for eth0/eth1 br0/br1 tap0/tap1

The command line for my vm (started by libvirtd) is :

/usr/bin/qemu-kvm -S -M pc -m 2048 -smp 3 -name dmail -uuid <snip> -monitor pty -pidfile /var/run/libvirt/qemu// -boot c -drive file=/var/lib/libvirt/images/dmail.img,if=ide,index=0,boot=on -drive file=/var/lib/libvirt/images/dmail-b.img,if=ide,index=1 -drive file=/local/download/CentOS-5.3-x86_64-bin-DVD/CentOS-5.3-x86_64-bin-DVD.iso,if=ide,media=cdrom,index=2 -net nic,macaddr=54:52:00:11:cb:ae,vlan=0 -net tap,fd=22,script=,vlan=0,ifname=vnet4 -net nic,macaddr=54:52:00:11:cb:af,vlan=1 -net tap,fd=23,script=,vlan=1,ifname=vnet5 -serial pty -parallel none -usb -vnc -k en-us

Last edited by TuPari; 08-05-2009 at 01:40 AM. Reason: more information


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 02:04 PM
KVM Virtual Machine CD CHANGE ashishverma1984 Fedora 2 12-12-2008 03:51 AM
Adding virtual interface for IP based virtual host pridefc Linux - General 6 03-16-2008 04:52 PM
What kernel-based virtual machine (KVM) means for gaming? toaster.waffle Linux - Games 2 12-30-2006 11:51 PM
KVM Switch, works out of the box Jaqui Linux - Hardware 1 08-03-2006 05:19 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration