From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Joey Connelly <joeyconnelly@u.boisestate.edu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU IP Address Accessibility
Date: Thu, 25 Aug 2016 18:41:13 +0100 [thread overview]
Message-ID: <20160825174112.GA2019@work-vm> (raw)
In-Reply-To: <CAOgv843F38KZZUg12kmAvhYEpsqy1vzFqJCH4U0qZ8S3YhN19g@mail.gmail.com>
* Joey Connelly (joeyconnelly@u.boisestate.edu) wrote:
> Hey QEMU devs team,
>
> I'm a CS graduate student working on Virtual Machine Software Security
> research at Boise State University. I was hoping I could have a few minutes
> of your time to ask a few simple QEMU specific questions.
>
> *[1.]* When creating a QEMU process, you can set the VM’s IP address when
> created right?
There are a few different ways of setting QEMUs networking up, with different
answers to your questions.
The basic one (unless you specify anything else) is 'user mode' or 'SLIRP'
which is a form of NAT, and it gives the answers of:
1) Yes you can - see the manpage under -net user and in particular the net=
option
2) No - not visible from the host directly but you can do specific port
forwarding, see the hostfwd= option
3) No, not visible to a 3rd party host
So that's all rather restricted.
But that's only the basic version - you can set qemu up to connect the
emulated network device to the real network of your host; this is a bit
more complex to setup, but then the answers are:
1) No, you can't set the IP address with qemu, it just gets out of the way
and passes L2 packets around; it's then up to some other layer
to setup IP (e.g. NAT on the host or your real networks DHCP server)
2) Yes it's accessible from the host (assuming you're not using macvtap)
3) And yes it's accessible from a 3rd party host.
For this see the tap and bridge options in the manpage.
They can be a bit tricky to setup depending what exactly you want to do;
If you have libvirt setup on your host it can do a lot of that
(with appropriate nat/firewalling/etc) for you.
Dave
>
>
>
> *[2.]* Once a VM has been created with QEMU is its IP address accessible
> from the host machine? And if so, could you help me construct a valid
> command that would access its IP address?
>
>
>
> *[3.]* Is it accessible from a third party machine? And if so, could you
> help me construct a valid command that would access its IP address?
>
>
>
>
>
> Thanks,
>
> -Joey
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
prev parent reply other threads:[~2016-08-25 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 16:23 [Qemu-devel] QEMU IP Address Accessibility Joey Connelly
2016-08-25 17:41 ` Dr. David Alan Gilbert [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=20160825174112.GA2019@work-vm \
--to=dgilbert@redhat.com \
--cc=joeyconnelly@u.boisestate.edu \
--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).