9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Networking problem with Plan 9 + Xen
@ 2007-05-11 17:33 Eric Boston
  2007-05-11 19:23 ` Richard Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Boston @ 2007-05-11 17:33 UTC (permalink / raw)
  To: 9fans

I am having problem configuring Plan 9 so that it can access both dom0
and the internet.

At the moment I am trying to configure Plan 9 with Xen; I have set up
a CPU/file server and an authentication server. I am able to access
the internet on dom0 through eth0 with the IP address of 192.168.0.1.
But I am having trouble configuring the networking of Plan 9.

What IP address should I give to Plan 9 and how do I configure it?

Thank you for your time.

-eric


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

* Re: [9fans] Networking problem with Plan 9 + Xen
  2007-05-11 17:33 [9fans] Networking problem with Plan 9 + Xen Eric Boston
@ 2007-05-11 19:23 ` Richard Miller
  2007-05-11 23:01   ` ron minnich
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Miller @ 2007-05-11 19:23 UTC (permalink / raw)
  To: 9fans

> At the moment I am trying to configure Plan 9 with Xen; I have set up
> a CPU/file server and an authentication server. I am able to access
> the internet on dom0 through eth0 with the IP address of 192.168.0.1.
> But I am having trouble configuring the networking of Plan 9.
> 
> What IP address should I give to Plan 9 and how do I configure it?

If your xen configuration bridges the virtual network interfaces
onto the physical ethernet, it's easy.  You just give Plan 9 another
address on the same subnet.  If you have a DHCP server on the local
network, the Plan 9 command
  ip/ipconfig
should pick up the configuration information from dhcp and do everything
needed.  Otherwise, suppose you want to give Plan 9 address 192.168.0.42
and your router is at 192.168.0.99; then use the command
  ip/ipconfig -g 192.168.0.99 ether /net/ether0 add 192.168.0.42



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

* Re: [9fans] Networking problem with Plan 9 + Xen
  2007-05-11 19:23 ` Richard Miller
@ 2007-05-11 23:01   ` ron minnich
  2007-05-12  1:30     ` Eric Boston
  2007-05-12 13:14     ` Richard Miller
  0 siblings, 2 replies; 6+ messages in thread
From: ron minnich @ 2007-05-11 23:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I prefer the nat way we do things. Aki and I set things up so when you
create the domain, it "just happens".

I can put my /etc/xen directory on sources if that will help

ron


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

* Re: [9fans] Networking problem with Plan 9 + Xen
  2007-05-11 23:01   ` ron minnich
@ 2007-05-12  1:30     ` Eric Boston
  2007-05-12  5:26       ` ron minnich
  2007-05-12 13:14     ` Richard Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Boston @ 2007-05-12  1:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 5/12/07, ron minnich <rminnich@gmail.com> wrote:
> I can put my /etc/xen directory on sources if that will help

Yes please, that will be very helpful.

-eric


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

* Re: [9fans] Networking problem with Plan 9 + Xen
  2007-05-12  1:30     ` Eric Boston
@ 2007-05-12  5:26       ` ron minnich
  0 siblings, 0 replies; 6+ messages in thread
From: ron minnich @ 2007-05-12  5:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 5/11/07, Eric Boston <eric.ashe.boston@gmail.com> wrote:
> On 5/12/07, ron minnich <rminnich@gmail.com> wrote:
> > I can put my /etc/xen directory on sources if that will help
>
> Yes please, that will be very helpful.

OK, on sources I have this:
cpu% pwd
/n/sources/xen/xen3/ronslaptop
cpu% ls -l
--rw-r--r-- M 65 rminnich xen 1844108 May 11 22:18 9xenpccpuf
--rw-r--r-- M 65 rminnich xen   76945 May 11 22:16 etcxen.tgz
cpu%

I dropped my current kernel on there just for reference.

The xen scripts were hacked on by Aki and me so that, when you do
xm create -c plan9test
you see this nice stuff appear in /etc/hosts and /etc/dhcpd.conf:
10.0.1.1        plan9

host plan9 { hardware ethernet 00:16:3e:4a:2d:78; fixed-address
10.0.1.1; option routers 10.0.1.128; option host-name "plan9"; option
domain-name-servers 192.168.0.1;}

This is useful because the way xen works, it gives you a different
veth every time, so you can't easily stick with a fixed IP/MAC.

BTW Aki and I talked today and we've given up on fbdev -- THX is going
to include X11. Such is life. The fbdev stuff is nowhere close to
solid enough to depend on.

Opera has kindly agreed to let us distribute opera on the THX, but --
there's a legal agreement I have to sign. Yuck. I am afraid to sign
it.

Somebody pointed out at the BAP9UG meeting that I should just bundle
inferno (and hence Charon) onto THX instead. So, that is what we will
do.

ron


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

* Re: [9fans] Networking problem with Plan 9 + Xen
  2007-05-11 23:01   ` ron minnich
  2007-05-12  1:30     ` Eric Boston
@ 2007-05-12 13:14     ` Richard Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Miller @ 2007-05-12 13:14 UTC (permalink / raw)
  To: 9fans

Ron says -

> I prefer the nat way we do things. Aki and I set things up so when you
> create the domain, it "just happens".

Not to start a xen configuration war here, but bridging and nat each
have different advantages.  If xen puts your virtual Plan 9 server
behind a nat, how do you access it from other machines on your network
or from the outside internet?

Without hacking on the standard xen scripts at all, my bridged
configuration also "just happens".

> This is useful because the way xen works, it gives you a different
> veth every time, so you can't easily stick with a fixed IP/MAC.

You can define a fixed ethernet address in the guest domain config
file.  As the example /n/sources/xen/xen3/etc-xen-plan9 shows:

  name = "plan9"
  vif = [ 'mac=aa:00:10:00:00:10' ]
  disk = ...

You can then configure your DHCP server to assign a fixed IP
address to this MAC.

If you don't use DHCP, then you don't need a fixed MAC, and
you can define all the IP address information in the guest
domain config file.  Just edit the Plan 9 /rc/bin/cpurc script
to contain the command
   eval ip/ipconfig $ipconfig
and set up the domain config file something like this:

name = "p9cpu"
vif = [ '' ]
disk = [ 'file:/usr/xen9/plan9.img,sda,w' ]
extra="""
bootargs=local!/dev/sd00/fossil
venti=/dev/sd00/arenas
ipconfig=-g 192.168.0.1 192.168.0.42
DNSSERVER=192.168.0.1 192.168.0.2
"""

If you configure the Plan 9 guest as a file and auth server, you could
use a second domain config file to define a diskless client, by
omitting the 'disk=' line, and defining the 'extra=' section something
like this:

extra="""
bootargs=tcp -g 192.168.0.1 192.168.0.100
fs=192.168.0.42
auth=192.168.0.42
DNSSERVER=192.168.0.1 192.168.0.2
"""



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

end of thread, other threads:[~2007-05-12 13:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-11 17:33 [9fans] Networking problem with Plan 9 + Xen Eric Boston
2007-05-11 19:23 ` Richard Miller
2007-05-11 23:01   ` ron minnich
2007-05-12  1:30     ` Eric Boston
2007-05-12  5:26       ` ron minnich
2007-05-12 13:14     ` Richard Miller

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