From: "Leonardo E. Reiter" <lreiter@win4lin.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Set hostname in DHCP response
Date: Sun, 12 Mar 2006 21:46:23 -0500 [thread overview]
Message-ID: <4414DCFF.7080600@win4lin.com> (raw)
In-Reply-To: <c1bf1cf0603121813n534b91bej5861d04972a9cf89@mail.gmail.com>
QEMU doesn't do a great job of supporting multiple user-net interfaces
right now. I was testing this the other day and getting some rather odd
behavior (unexpected segfaults, etc.) I didn't debug deep enough to
figure out the specifics, but having a global state (like slirp is
today) for multiple network providers is probably not a good idea. I am
contemplating writing a patch that will change the global state in slirp
to an actual "opaque" state, even letting various slirp instances be
configured to serve different subnets, etc. This would be useful if for
example you wanted to have 1 slirp interface access only "special"
services, like smb, etc., and another act as a NAT to the internet. In
that case, in theory, stuff like VPN software in the guest OS should
work without disrupting access to "special" services. But for something
like this to truly work, you need to have the ability to configure the
subnet that slirp sets up _per NIC_, and that would of course mean
removing the global state as the most obvious (and correct IMHO) solution.
Others will probably argue that you can use a combination of a single
slirp NIC and a NAT tun/tap set up to accomplish the same basic thing
today, without any modifications. Still, the "zero" host configuration
of slirp makes it very attractive on its own, so I still think the patch
I'm referring to would be valuable. I'd also implement an option to
make slirp return the DNS/gateway in the DHCP packet for only 1
interface, since guest OS's would probably not like having multiple
default gateways. This patch would be useful in a slightly different
way even if you were trying to combine slirp with tun/tap, and having
the guest OS configured for DHCP on all interfaces. For example, you
may want the guest OS to use the tun/tap interface as the default route,
so telling the slirp interface to not return a gateway/DNS would
probably still be a good idea even if you were only using 1 -net user.
That patch by itself would be trivial versus the global->local state
patch I mentioned above, so I can see posting that one much sooner, if
it even works as I'm expecting it to ;)
Regards,
Leo Reiter
Ed Swierk wrote:
> I agree, since the hostname is relevant only for user-net interfaces.
> An updated patch is attached.
>
> The only issue is that there's just a single, global hostname, not a
> hostname per user-net interface. On the other hand, I'm not sure if
> qemu supports multiple user-net interfaces in the first place. Does
> the following configuration make sense?
>
> -net nic,vlan=0 -net user,vlan=0 -net nic,vlan=1 -net user,vlan=1
>
> --Ed
--
Leonardo E. Reiter
Vice President of Product Development, CTO
Win4Lin, Inc.
Virtual Computing from Desktop to Data Center
Main: +1 512 339 7979
Fax: +1 512 532 6501
http://www.win4lin.com
prev parent reply other threads:[~2006-03-13 2:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-10 7:35 [Qemu-devel] [PATCH] Set hostname in DHCP response Ed Swierk
2006-03-11 22:19 ` Paul Brook
2006-03-13 2:13 ` Ed Swierk
2006-03-13 2:46 ` Leonardo E. Reiter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4414DCFF.7080600@win4lin.com \
--to=lreiter@win4lin.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).