9front - general discussion about 9front
 help / color / mirror / Atom feed
* non-9front dhcp server -> /lib/ndb/local ignored?
@ 2015-12-28 20:34 sl
  2015-12-29  0:20 ` [9front] " arisawa
  0 siblings, 1 reply; 9+ messages in thread
From: sl @ 2015-12-28 20:34 UTC (permalink / raw)
  To: 9front

At my job we have a free wifi access point that I connect
to from 9front like this:

	; ip/ipconfig	# NOTE: DHCP server is not Plan 9.

This gets me on the Internet. Everything works.

Except, values configured in /lib/ndb/local all seem to
be ignored. No sys= or auth= entries are recognized. In
order to successfully cpu/import remote Plan 9 machines,
I have to manually add auth= authdom= entries for the
corresponding auth servers in /net/ndb, and then refer
to them by the FQDNs.

At home, I use an identical /lib/ndb/local. All home
machines either PXE or TCP boot from the same file
server where the ndb file is stored. All of these
machines can successfully refer to local sys= entries,
even those that are in separate ipnets.

From all of this, it seems like Plan 9 machines that get
DHCP from a non-Plan 9 machine ignore /lib/ndb/local.

What's going on?

sl


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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
  2015-12-28 20:34 non-9front dhcp server -> /lib/ndb/local ignored? sl
@ 2015-12-29  0:20 ` arisawa
  0 siblings, 0 replies; 9+ messages in thread
From: arisawa @ 2015-12-29  0:20 UTC (permalink / raw)
  To: 9front

hello,

sorry if I misunderstand what you said.

I have cpu server and auth server which I want to use from both home and internet.
those names are:
(1) hebe (or hebe.local) in home and hebe.nyx.link from internet
(2) grid (or grid.local) in home and grid.nyx.link form internet

I have plan9 terminal on virtualbox on macbook.
that is, I use the terminal in two types of environment.
(a) local wifi in my home with plan9 based DHCP and DNS.
(b) mobile router wifi with mobile ISP based DHCP and DNS.

of course we need fqdn in accessing from internet.
however /lib/ndb/local is not ignored.

the relevant parts of /lib/ndb/local of the terminals and servers are like this:

dom=nyx.link
	auth=hebe.nyx.link

dom=local soa=
	refresh=3600 ttl=3600
	ns=hebe.loca
	auth=hebe

ipnet=local ip=192.168.0.0 ipmask=255.255.255.0
	ipgw=192.168.0.1
	proto=tcp
	ntp=ntp.jst.mfeed.ad.jp
	auth=hebe
	fs=hebe
	dns=hebe
	dnsdomain=local

[snip]

sys=hebe
	dom=hebe.local
	ether=6805ca0a0bf2
	ip=192.168.0.6
	ip=2402:6b00:22cd:bf80::6

sys=grid
	dom=grid.local
	ether=74d435876245
	ip=192.168.0.9
	ip=2402:6b00:22cd:bf80::9
	bootf=/amd64/9bootpxe		# 9front

[snip]


> 2015/12/29 5:34、sl@stanleylieber.com のメール:
> 
> At my job we have a free wifi access point that I connect
> to from 9front like this:
> 
> 	; ip/ipconfig	# NOTE: DHCP server is not Plan 9.
> 
> This gets me on the Internet. Everything works.
> 
> Except, values configured in /lib/ndb/local all seem to
> be ignored. No sys= or auth= entries are recognized. In
> order to successfully cpu/import remote Plan 9 machines,
> I have to manually add auth= authdom= entries for the
> corresponding auth servers in /net/ndb, and then refer
> to them by the FQDNs.
> 
> At home, I use an identical /lib/ndb/local. All home
> machines either PXE or TCP boot from the same file
> server where the ndb file is stored. All of these
> machines can successfully refer to local sys= entries,
> even those that are in separate ipnets.
> 
> From all of this, it seems like Plan 9 machines that get
> DHCP from a non-Plan 9 machine ignore /lib/ndb/local.
> 
> What's going on?
> 
> sl



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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
  2015-12-29 19:14 sl
@ 2016-01-04 17:47 ` Ethan Grammatikidis
  0 siblings, 0 replies; 9+ messages in thread
From: Ethan Grammatikidis @ 2016-01-04 17:47 UTC (permalink / raw)
  To: 9front

regarding the conversation i had with cinap on a similar subject (cs failing to resolve names in /lib/ndb/local), the bug has not manifested since i moved the vm to a different host. i've been checking at intervals over the last 5 days, it hasn't failed once.


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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
@ 2015-12-29 19:14 sl
  2016-01-04 17:47 ` Ethan Grammatikidis
  0 siblings, 1 reply; 9+ messages in thread
From: sl @ 2015-12-29 19:14 UTC (permalink / raw)
  To: 9front

> hmmm... could it just be that ndb/cs sees the wrong /lib/ndb/local file?
> 
> you said you *bind* your local network configuration but will ndb/cs
> see it in its namespace?

That turned out to be the problem.

If I kill and restart cs after binding my custom /lib/ndb/local, everything
works as expected.

sl


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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
  2015-12-29  1:09 sl
  2015-12-29  2:31 ` Steve Simon
  2015-12-29  3:56 ` arisawa
@ 2015-12-29  5:04 ` cinap_lenrek
  2 siblings, 0 replies; 9+ messages in thread
From: cinap_lenrek @ 2015-12-29  5:04 UTC (permalink / raw)
  To: 9front

hmmm... could it just be that ndb/cs sees the wrong /lib/ndb/local file?

you said you *bind* your local network configuration but will ndb/cs
see it in its namespace?

--
cinap


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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
  2015-12-29  1:09 sl
  2015-12-29  2:31 ` Steve Simon
@ 2015-12-29  3:56 ` arisawa
  2015-12-29  5:04 ` cinap_lenrek
  2 siblings, 0 replies; 9+ messages in thread
From: arisawa @ 2015-12-29  3:56 UTC (permalink / raw)
  To: 9front

hello

> 2015/12/29 10:09、sl@stanleylieber.com のメール:
> 
> Doesn't your virtualbox terminal always see itself as being on its own
> local network? Correct me if I'm wrong, but if I understand you correctly,
> your host OS gets its IP from the "mobile router wifi with mobile ISP based
> DHCP and DNS," while your virtualbox terminal gets its IP from virtualbox
> itself. Is your virtualbox terminal getting its IP from virtualbox via
> DHCP, or is it configured in ndb with a static IP address?

I should have written more information on this subject.

virtualbox works fine with plan9 except that doesn’t support ipv6.
we can share files using u9fs, and also we can cut&paste between host and guest (not perfect though).
virtualbox serves nat and bridge networks for the guest os.
net is much better for plan9 terminal on macbook because the plan9 terminal can look host (macbook) using fixed ip address, which makes automatic connection possible from guest to host.

there is a problem with current /rc/bin/termrc.
that does not work well for the terminals with dynamically assigned IP by dhcp server.
therefore I have /rc/bin/termrc.local with content:
if(! ~ $#kbmap 0)
	cp /sys/lib/kbmap/$kbmap /dev/kbmap
ether=()
if(test -e /net/ether0/addr)
	ether=`{cat /net/ether0/addr}
sysname=`{ndb/query ether $ether sys}
if(~ $#sysname 0 || ~ $sysname ''){
	ip/ipconfig
	sysname=cirno
	echo -n $sysname >/dev/sysname
}

probably we may have better solution.
I think some codes in the above /rc/bin/termrc.local should be moved into /rc/bin/termrc so that
plan9 terminals under non-plan9 environment can have it’s ip address without manual intervention .

>> 
>> 	ns=hebe.loca
> 
> Is this a typo?

yes.



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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
@ 2015-12-29  2:55 sl
  0 siblings, 0 replies; 9+ messages in thread
From: sl @ 2015-12-29  2:55 UTC (permalink / raw)
  To: 9front

> maybe being foolish, but from memory - the config you see does not
> include a dnsdomain= entry so dns(1) does not know which names are
> local and which are not.

ndb(6) says:

          dnsdomain  a domain name that ndb/dns adds onto any unrooted
                     names when doing a search.  There may be multiple
                     dnsdomain pairs.


Shouldn't ndb just devolve to the (sole) existing sys= entry for mars2?

In any case, sys= is not the only attr that gets ignored. All the
auth= authdom= entries in /lib/ndb/local are also ignored. I have to
manually add them to /net/ndb in order to cpu/import remote systems.


> in you example you use ping, does that work with a fully qualified
> domain name?

Yes.

sl


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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
  2015-12-29  1:09 sl
@ 2015-12-29  2:31 ` Steve Simon
  2015-12-29  3:56 ` arisawa
  2015-12-29  5:04 ` cinap_lenrek
  2 siblings, 0 replies; 9+ messages in thread
From: Steve Simon @ 2015-12-29  2:31 UTC (permalink / raw)
  To: 9front

maybe being foolish, but from memory - the config you see does not include a dnsdomain= entry so dns(1) does not know which names are local and which are not.

in you example you use ping, does that work with a fully qualified domain name?

-Steve


On 29 Dec 2015, at 01:09, sl@stanleylieber.com wrote:

>> I have cpu server and auth server which I want to use from both home and internet.
>> those names are:
>> (1) hebe (or hebe.local) in home and hebe.nyx.link from internet
>> (2) grid (or grid.local) in home and grid.nyx.link form internet
>> 
>> I have plan9 terminal on virtualbox on macbook.
>> that is, I use the terminal in two types of environment.
>> (a) local wifi in my home with plan9 based DHCP and DNS.
>> (b) mobile router wifi with mobile ISP based DHCP and DNS.
>> 
>> of course we need fqdn in accessing from internet.
> 
> My setup is similar but slightly different.
> 
> In my (b) environment, I boot the 9front.iso livecd off of an image on
> a USB stick and then bind my customizations (including /lib/ndb/local)
> over the running system before launching my network configuration. My
> 9front terminal then gets an IP address from the free wifi access point
> here in the building. I don't have any control over which address or what
> settings my 9front terminal receives from that DHCP server. Once I've
> received my DHCP lease my terminal *can* resolve values from ndb but
> *cannot* operate on them:
> 
>    ; ndb/query sys mars2
>    sys=mars2 dom=mars2.inri.net ether=525400099935 ip=216.126.196.35 ipmask=255.255.255.224 ipgw=216.126.196.33 auth=mars2.inri.net authdom=mars2 dns=208.67.222.222 dns=208.67.220.220 mx=mars2.inri.net pref=5 txtrr=v=spf1 mx -all 
>    ; ip/ping -n 3 mars2
>    ip/ping: couldn't dial icmp!mars2!1: cs: can't translate address: dns: resource does not exist; negrcode
>    ;
> 
> Similarly, auth= authdom= entries in /lib/ndb/local are ignored, but
> work fine when I add them manually to /net/ndb.
> 
> I'd point out again that my terminal here at work is using the exact
> same /lib/ndb/local file as my machines at home, all of which can
> successfully perform the ip/ping -n 3 mars2 operation, and recognize
> auth servers, without needing to edit /net/ndb manually.
> 
> Maybe I'm just doing something wrong, but the only real difference
> I am aware of is that all of my machines at home are completely
> controlled by Plan 9, while my terminal here at work gets its IP
> address from a non-Plan 9 DHCP server.
> 
> 
>>    ns=hebe.loca
> 
> Is this a typo?
> 
> About your setup:
> 
> Doesn't your virtualbox terminal always see itself as being on its own
> local network? Correct me if I'm wrong, but if I understand you correctly,
> your host OS gets its IP from the "mobile router wifi with mobile ISP based
> DHCP and DNS," while your virtualbox terminal gets its IP from virtualbox
> itself. Is your virtualbox terminal getting its IP from virtualbox via
> DHCP, or is it configured in ndb with a static IP address?
> 
> sl


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

* Re: [9front] non-9front dhcp server -> /lib/ndb/local ignored?
@ 2015-12-29  1:09 sl
  2015-12-29  2:31 ` Steve Simon
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: sl @ 2015-12-29  1:09 UTC (permalink / raw)
  To: 9front, sl

> I have cpu server and auth server which I want to use from both home and internet.
> those names are:
> (1) hebe (or hebe.local) in home and hebe.nyx.link from internet
> (2) grid (or grid.local) in home and grid.nyx.link form internet
> 
> I have plan9 terminal on virtualbox on macbook.
> that is, I use the terminal in two types of environment.
> (a) local wifi in my home with plan9 based DHCP and DNS.
> (b) mobile router wifi with mobile ISP based DHCP and DNS.
> 
> of course we need fqdn in accessing from internet.

My setup is similar but slightly different.

In my (b) environment, I boot the 9front.iso livecd off of an image on
a USB stick and then bind my customizations (including /lib/ndb/local)
over the running system before launching my network configuration. My
9front terminal then gets an IP address from the free wifi access point
here in the building. I don't have any control over which address or what
settings my 9front terminal receives from that DHCP server. Once I've
received my DHCP lease my terminal *can* resolve values from ndb but
*cannot* operate on them:

	; ndb/query sys mars2
	sys=mars2 dom=mars2.inri.net ether=525400099935 ip=216.126.196.35 ipmask=255.255.255.224 ipgw=216.126.196.33 auth=mars2.inri.net authdom=mars2 dns=208.67.222.222 dns=208.67.220.220 mx=mars2.inri.net pref=5 txtrr=v=spf1 mx -all 
	; ip/ping -n 3 mars2
	ip/ping: couldn't dial icmp!mars2!1: cs: can't translate address: dns: resource does not exist; negrcode
	;

Similarly, auth= authdom= entries in /lib/ndb/local are ignored, but
work fine when I add them manually to /net/ndb.

I'd point out again that my terminal here at work is using the exact
same /lib/ndb/local file as my machines at home, all of which can
successfully perform the ip/ping -n 3 mars2 operation, and recognize
auth servers, without needing to edit /net/ndb manually.

Maybe I'm just doing something wrong, but the only real difference
I am aware of is that all of my machines at home are completely
controlled by Plan 9, while my terminal here at work gets its IP
address from a non-Plan 9 DHCP server.


> 	ns=hebe.loca

Is this a typo?

About your setup:

Doesn't your virtualbox terminal always see itself as being on its own
local network? Correct me if I'm wrong, but if I understand you correctly,
your host OS gets its IP from the "mobile router wifi with mobile ISP based
DHCP and DNS," while your virtualbox terminal gets its IP from virtualbox
itself. Is your virtualbox terminal getting its IP from virtualbox via
DHCP, or is it configured in ndb with a static IP address?

sl


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

end of thread, other threads:[~2016-01-04 17:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-28 20:34 non-9front dhcp server -> /lib/ndb/local ignored? sl
2015-12-29  0:20 ` [9front] " arisawa
2015-12-29  1:09 sl
2015-12-29  2:31 ` Steve Simon
2015-12-29  3:56 ` arisawa
2015-12-29  5:04 ` cinap_lenrek
2015-12-29  2:55 sl
2015-12-29 19:14 sl
2016-01-04 17:47 ` Ethan Grammatikidis

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