9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: yy <yiyu.jgl@gmail.com>
To: lucio@proxima.alt.za,
	Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9vx/vx32 - Out of ignorance
Date: Sun, 12 Sep 2010 19:30:05 +0200	[thread overview]
Message-ID: <AANLkTimnbxBKj8a+Ny-vGkCZ79B35FLOXJNvDThFNaMd@mail.gmail.com> (raw)
In-Reply-To: <20100912161716.GB3919@fangle.proxima.alt.za>

2010/9/12 Lucio De Re <lucio@proxima.alt.za>:
> My thinking is that 9vx could start up as root
> to install the TAP device (nothing else so far has alerted me to a need
> for root permissions), then switch user to the selected one (if it exists,
> "nobody" may be needed if there is no equivalent in the host repertoire)
> once setting up is complete.

The advantage of the tap device is precisely that it does not need
root permissions. You need those permissions to manage the devices,
but that will be normally done by tunctl or openvpn. Those are the
programs that have to worry about being run as root, not 9vx. In other
words: you need to be root to create the tap device, but not to use
it.

> And if anybody can arrange a short lesson on using networking under 9vx,
> that would also be greatly appreciated.

Inside 9vx, networking with tap devices is not different to using
physical devices. At the host system level, it works as it does in
qemu (there could be more bugs though). There are many qemu tutorials
with sample scripts and better explanations than what I could give.
The particular configuration I'm using is documented at:

http://wiki.archlinux.org/index.php/QEMU#Tap_Networking_with_QEMU

Based on the qemu-ifup/down scripts described there I wrote a 9vx-tap
script you can find at:

http://bitbucket.org/yiyus/vx32/src/tip/src/9vx/9vx-tap

Probably disecting that script is the best way to understand how the
bridge, the tap devices and 9vx play together.

--
- yiyus || JGL . 4l77.com



  parent reply	other threads:[~2010-09-12 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 16:17 Lucio De Re
2010-09-12 17:20 ` ron minnich
2010-09-12 17:30 ` yy [this message]
2010-09-12 19:27   ` Bakul Shah
2010-09-12 19:41     ` Lucio De Re
2010-09-12 19:30   ` Lucio De Re
2010-09-12 20:26     ` yy

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=AANLkTimnbxBKj8a+Ny-vGkCZ79B35FLOXJNvDThFNaMd@mail.gmail.com \
    --to=yiyu.jgl@gmail.com \
    --cc=9fans@9fans.net \
    --cc=lucio@proxima.alt.za \
    /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).