Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2008 01:25:18 +0000
From:      "Jim Stapleton" <stapleton.41@gmail.com>
To:        "Andrew Cid" <andrew@accid.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: QEMU networking quirkiness on 7.0
Message-ID:  <80f4f2b20804091825y2a37bddehd68e91f57426dc04@mail.gmail.com>
In-Reply-To: <20080409091859.GA14939@farnborough.darq.net>
References:  <80f4f2b20804081710k5af28466k17f3d38cdd6e344a@mail.gmail.com> <20080409091859.GA14939@farnborough.darq.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 9, 2008 at 9:18 AM, Andrew Cid <andrew@accid.net> wrote:
> Hi Jim,
>
>
>  > The QEmu VM can access the web (I'm typing this out now in WindowsXP
>  > running safely in it's cage, for example). But it cannot VPN into work
>  > (timeout) or ping anything. I suspect it has to do with the way that
>  > QEmu is given network access. Is there any way to set up QEmu to
>  > access the network through an aliased IP address, and hence look like
>  > any other machine on my network, rather than to hide behind my BSD
>  > box? Is there another route I should take?+
>
>
>  I connect my qemu boxes via the tap interface and then bridge it to the
>  external interface so it works like just another box on the LAN.  It's
>  quite easy to setup and works pretty well, checkout:
>  http://people.freebsd.org/~maho/qemu/qemu.html
>


I just C&Ped a huge section and tacked it on to the end of this mail.
It says to do this within the emulator, but the emulator is supposedly
running win2k. I take it this is done on the host system?


Thanks,
-Jim Stapleton















 Networking
Default, network is configured inside of the emulator; not visible
from outside. This is not absolutely confotable! There are pros and
cons: you must be the root and your qemu virtual machine is visible
from outside. Assume you know your network interface name. In my case
this is fxp0. you can check this by:

% dmesg | grep Ethernet

First, as root,

# kldload bridge.ko
# sysctl net.link.ether.bridge_cfg=fxp0,tap0
net.link.ether.bridge_cfg:  -> fxp0,tap0
# sysctl net.link.ether.bridge.enable=1
net.link.ether.bridge.enable: 0 -> 1

create /etc/qemu-ifup script as

#!/bin/sh
ifconfig ${1} 0.0.0.0

and make this script runnable.

# chmod 755 /etc/qemu-ifup

To do this at every boot time, write /etc/sysctl.conf

net.link.ether.bridge_cfg=fxp0,tap0
net.link.ether.bridge.enable=1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80f4f2b20804091825y2a37bddehd68e91f57426dc04>