[9fans] Help with networking on Virtual Box

2014-02-11 Thread Peter Hull
Dear All,
I am just trying to set up Plan 9 so I can have a play with it. I'm
running it in VirtualBox 4.3.6 and I'm running into the DNS problem
that has been reported earlier [1]

ip/ipconfig seems to run fine but it assigns an address of 127.0.0.1
and DNS doesn't work.

Unfortunately (as far as I can see) the previous reports didn't come
up with a solution or the reporter found a different way to run Plan
9.

 I used the -D option on ip/ipconfig and got this:
term% ip/ipconfig -D
ipconfig: parsebootp: new packet
ipconfig: parseoptions: type(53) len 1, bytes left 58
ipconfig: parseoptions: serverid(54) len 4, bytes left 55
ipconfig: parseoptions: lease(51) len 4, bytes left 49
ipconfig: parseoptions: ipmask(1) len 4, bytes left 43
ipconfig: parseoptions: ipgw(3) len 4, bytes left 37
ipconfig: parseoptions: dns(6) len 4, bytes left 31
ipconfig: got offer from 0.0.0.0
ipconfig: lease=86400
ipconfig: server=192.168.1.1 sname=
ipconfig: parsebootp: new packet
ipconfig: parseoptions: type(53) len 1, bytes left 58
ipconfig: parseoptions: serverid(54) len 4, bytes left 55
ipconfig: parseoptions: lease(51) len 4, bytes left 49
ipconfig: parseoptions: ipmask(1) len 4, bytes left 43
ipconfig: parseoptions: ipgw(3) len 4, bytes left 37
ipconfig: parseoptions: dns(6) len 4, bytes left 31
ipconfig: got ack from 0.0.0.0
ipconfig: lease=86400
ipconfig: ipaddr=192.168.1.25 ipmask=255.255.255.0
ipconfig: ipgw=192.168.1.1
ipconfig: dns=192.168.1.1
ipconfig: server=192.168.1.1 sname=
term% cat /net/ndb
ip=127.0.0.1 ipmask=/104 ipgw=::
sys=gnot
sys=gnot
dns=192.168.1.1

Does anyone know how I might go about solving the problem?

Thanks,
Peter

[1]: http://9fans.net/archive/2013/08/31



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread erik quanstrom
> ipconfig: ipaddr=192.168.1.25 ipmask=255.255.255.0
> ipconfig: ipgw=192.168.1.1
> ipconfig: dns=192.168.1.1
> ipconfig: server=192.168.1.1 sname=
> term% cat /net/ndb
> ip=127.0.0.1 ipmask=/104 ipgw=::
> sys=gnot
> sys=gnot
> dns=192.168.1.1
> 
> Does anyone know how I might go about solving the problem?

what is the result of "cat /net/iproute"?  i would expect that routing
entries are there.  can you ping the hypervisor's ip address from
the vm?  if not, ratrace(1) can help hunt down what's goign on.

- erik



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread Patryk Laurent
Hi Peter,

I had the same DNS issue under VirtualBox. Here is my procedure after every 
reboot (I am new to plan9 so there may be a better way):

1. Run ip/ipconfig
2. cat /net/ipselftab to find your VM's internal ip (10.0.x.x?)
3. Set your IP in /lib/ndb/local  ip = …
4. Run ndb/dns -r

I don't know enough about plan9 to know why this is necessary.  I pieced this 
procedure together using the docs and help from the IRC channel. 

Plan9 is really cool though -- enjoy!

Best,
Patryk



> On Feb 11, 2014, at 3:32, Peter Hull  wrote:
> 
> Dear All,
> I am just trying to set up Plan 9 so I can have a play with it. I'm
> running it in VirtualBox 4.3.6 and I'm running into the DNS problem
> that has been reported earlier [1]
> 
> ip/ipconfig seems to run fine but it assigns an address of 127.0.0.1
> and DNS doesn't work.
> 
> Unfortunately (as far as I can see) the previous reports didn't come
> up with a solution or the reporter found a different way to run Plan
> 9.
> 
> I used the -D option on ip/ipconfig and got this:
> term% ip/ipconfig -D
> ipconfig: parsebootp: new packet
> ipconfig: parseoptions: type(53) len 1, bytes left 58
> ipconfig: parseoptions: serverid(54) len 4, bytes left 55
> ipconfig: parseoptions: lease(51) len 4, bytes left 49
> ipconfig: parseoptions: ipmask(1) len 4, bytes left 43
> ipconfig: parseoptions: ipgw(3) len 4, bytes left 37
> ipconfig: parseoptions: dns(6) len 4, bytes left 31
> ipconfig: got offer from 0.0.0.0
> ipconfig: lease=86400
> ipconfig: server=192.168.1.1 sname=
> ipconfig: parsebootp: new packet
> ipconfig: parseoptions: type(53) len 1, bytes left 58
> ipconfig: parseoptions: serverid(54) len 4, bytes left 55
> ipconfig: parseoptions: lease(51) len 4, bytes left 49
> ipconfig: parseoptions: ipmask(1) len 4, bytes left 43
> ipconfig: parseoptions: ipgw(3) len 4, bytes left 37
> ipconfig: parseoptions: dns(6) len 4, bytes left 31
> ipconfig: got ack from 0.0.0.0
> ipconfig: lease=86400
> ipconfig: ipaddr=192.168.1.25 ipmask=255.255.255.0
> ipconfig: ipgw=192.168.1.1
> ipconfig: dns=192.168.1.1
> ipconfig: server=192.168.1.1 sname=
> term% cat /net/ndb
> ip=127.0.0.1 ipmask=/104 ipgw=::
> sys=gnot
> sys=gnot
> dns=192.168.1.1
> 
> Does anyone know how I might go about solving the problem?
> 
> Thanks,
> Peter
> 
> [1]: http://9fans.net/archive/2013/08/31
> 



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread Bakul Shah
On Tue, 11 Feb 2014 11:32:36 GMT Peter Hull  wrote:
> Dear All,
> I am just trying to set up Plan 9 so I can have a play with it. I'm
> running it in VirtualBox 4.3.6 and I'm running into the DNS problem
> that has been reported earlier [1]

What settings are you using in virtual box for networking?
What is the host?



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread Peter Hull
Hi All,
Thanks for the responses. To answer your questions
Erik, here is /net/iproute. Unfortunately I moved to a different wifi
network so the addresses are different to my initial post

0.0.0.0 /96  192.168.0.1 4none   -
192.168.0.0 /120 192.168.0.0 4i   ifc1
192.168.0.0 /128 192.168.0.0 4b   ifc-
192.168.0.28/128 192.168.0.284u   ifc1
192.168.0.255   /128 192.168.0.255   4b   ifc-
127.0.0.0   /104 127.0.0.0   4i   ifc-
127.0.0.0   /128 127.0.0.0   4b   ifc-
127.0.0.1   /128 127.0.0.1   4u   ifc-
127.255.255.255 /128 127.255.255.255 4b   ifc-
255.255.255.255 /128 255.255.255.255 4b   ifc1

I could ping the host PC from Plan 9 and vice versa.

Patryk, unfortunately that didn't seem to change anything; I still got
the dns error.

Bakul, The host is Windows 8.1 64-bit, network settings are intel pro
mt server, using bridged mode (to my wifi adaptor.) I got these
options from an earlier posting.

thanks,
Pete



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread Bakul Shah
On Tue, 11 Feb 2014 20:09:42 GMT Peter Hull  wrote:
> 
> Bakul, The host is Windows 8.1 64-bit, network settings are intel pro
> mt server, using bridged mode (to my wifi adaptor.) I got these
> options from an earlier posting.

Are you running ndb/dns -r?

There is probably a better way to do this but I usually add
the following to my /rc/bin/termrc.local

nds/cs -f $NDBFILE
ip/ipconfig
ndb/dns -r
TIMESYNCARGS=(-n pool.ntp.org)



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread erik quanstrom
> nds/cs -f $NDBFILE
> ip/ipconfig
> ndb/dns -r
> TIMESYNCARGS=(-n pool.ntp.org)

hmmm.  most of this is already in the default termrc, including the cs,
ipconfig (if you uncomment it) and dns.

- erik



Re: [9fans] Help with networking on Virtual Box

2014-02-11 Thread erik quanstrom
> Thanks for the responses. To answer your questions
> Erik, here is /net/iproute. Unfortunately I moved to a different wifi
> network so the addresses are different to my initial post
> 
> 0.0.0.0 /96  192.168.0.1 4none   -
> 192.168.0.0 /120 192.168.0.0 4i   ifc1
> 192.168.0.0 /128 192.168.0.0 4b   ifc-
> 192.168.0.28/128 192.168.0.284u   ifc1
> 192.168.0.255   /128 192.168.0.255   4b   ifc-
> 127.0.0.0   /104 127.0.0.0   4i   ifc-
> 127.0.0.0   /128 127.0.0.0   4b   ifc-
> 127.0.0.1   /128 127.0.0.1   4u   ifc-
> 127.255.255.255 /128 127.255.255.255 4b   ifc-
> 255.255.255.255 /128 255.255.255.255 4b   ifc1
> 
> I could ping the host PC from Plan 9 and vice versa.

i certainly would do some debugging to see if ndb/cs is really
running, and if dns is running, too.  iirc, the default termrc
has ipconfig commented out, so dns will not start.

this should probablly be fixed by giving ipconfig a sensible
timeout, and always running it.

- erik



Re: [9fans] Help with networking on Virtual Box

2014-02-12 Thread Peter Hull
On Tue, Feb 11, 2014 at 9:29 PM, erik quanstrom  wrote:
> i certainly would do some debugging to see if ndb/cs is really
> running, and if dns is running, too.  iirc, the default termrc
> has ipconfig commented out, so dns will not start.
I'm typing ip/ipconfig and ndb/dns -r on every reboot at the moment. I
tried ndb/csquery and it looked reasonable. For a query of
'localhost!cs' I got  '/net/localhost/clone cs' and for
'localhost!dns' I got '/net/localhost/clone dns'
For ndb/dnsquery it looked less good, for 'localhost ip' I got
'!dns:resource does not exist; negrcode 0' and for 'www.google.com ip'
I got '!dns: dns failure'
I have only just started on plan 9 so apologies if this is the wrong
way to test the servers.

For those already running on virtual box, what version are you
running? I could try that and see if it's a VB problem (I believe they
overhauled the network code in v4.3)

Thanks.
pete



Re: [9fans] Help with networking on Virtual Box

2014-02-12 Thread Bakul Shah
Uncomment ip/ifconfig in termrc as Erik suggested or stick the four lines that 
I showed in termrc.local. I think there is some sequencing issue if you run 
them manually.

Before switching the VB version try changing its network setting to NAT. With a 
different VB version you'll likely chase a different set if problems!

> On Feb 12, 2014, at 12:17 AM, Peter Hull  wrote:
> 
>> On Tue, Feb 11, 2014 at 9:29 PM, erik quanstrom  
>> wrote:
>> i certainly would do some debugging to see if ndb/cs is really
>> running, and if dns is running, too.  iirc, the default termrc
>> has ipconfig commented out, so dns will not start.
> I'm typing ip/ipconfig and ndb/dns -r on every reboot at the moment. I
> tried ndb/csquery and it looked reasonable. For a query of
> 'localhost!cs' I got  '/net/localhost/clone cs' and for
> 'localhost!dns' I got '/net/localhost/clone dns'
> For ndb/dnsquery it looked less good, for 'localhost ip' I got
> '!dns:resource does not exist; negrcode 0' and for 'www.google.com ip'
> I got '!dns: dns failure'
> I have only just started on plan 9 so apologies if this is the wrong
> way to test the servers.
> 
> For those already running on virtual box, what version are you
> running? I could try that and see if it's a VB problem (I believe they
> overhauled the network code in v4.3)
> 
> Thanks.
> pete
> 



Re: [9fans] Help with networking on Virtual Box

2014-02-12 Thread Peter Hull
On Wed, Feb 12, 2014 at 8:52 AM, Bakul Shah  wrote:
> Uncomment ip/ifconfig in termrc as Erik suggested or stick the four lines 
> that I showed in termrc.local. I think there is some sequencing issue if you 
> run them manually.
Bakul, Erik,
Thanks very much. Editing termrc as you suggested now gives me a
'proper' IP and DNS seems to work (dnsquery and ping both fine)

I will see if I can work out why the sequencing needs to be as it is.
Pete