qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU IP Address Accessibility
@ 2016-08-25 16:23 Joey Connelly
  2016-08-25 17:41 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Joey Connelly @ 2016-08-25 16:23 UTC (permalink / raw)
  To: qemu-devel

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?



*[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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] QEMU IP Address Accessibility
  2016-08-25 16:23 [Qemu-devel] QEMU IP Address Accessibility Joey Connelly
@ 2016-08-25 17:41 ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Dr. David Alan Gilbert @ 2016-08-25 17:41 UTC (permalink / raw)
  To: Joey Connelly; +Cc: qemu-devel

* 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-25 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-25 16:23 [Qemu-devel] QEMU IP Address Accessibility Joey Connelly
2016-08-25 17:41 ` Dr. David Alan Gilbert

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).