[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Two taps, one IP?

Alex Samad wrote:
Sorry for the top post.

But the problem is you have 2 interfaces in the same non connected

if .3 is on tap1 then add
ip r a dev tap1
ip r a dev tap0

Your solution use vde to link the tap's or change the ip network so they
are not the same


Yep, you're completely right.  I was just in the process of writing:

Success! I didn't go the VDE route, I just fixed it so tap0 and tap1 have different IPs. It's so obvious I don't know why it didn't occur to me before.

I did this by simply skipping the default "qemu-ifup" script, which is:

david@SonOfLappy:/svn/staging$ cat /etc/qemu-ifup
sudo -p "Password for $0:" /sbin/ifconfig $1

And instead creating separate image0-ifup and image1-ifup scripts as:

david@SonOfLappy:/svn/staging$ cat image0-ifup
sudo -p "Password for $0:" /sbin/ifconfig $1
david@SonOfLappy:/svn/staging$ cat image1-ifup
sudo -p "Password for $0:" /sbin/ifconfig $1

Then I start it with:

sudo qemu -kernel-kqemu -net nic,macad0:00:00:00 -net tap,script=image0-ifup image0.raw

sudo qemu -kernel-kqemu -net nic,macad0:00:00:11 -net tap,script=image1-ifup image1.raw

Now it works great, I can wget from the host to both guests. Granted, the guests can't talk to each other, but that's actually a good thing as I'm explicitly trying to segment them apart. Hooray for qemu, and thanks for all your help!


Reply to: