9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* RE: [9fans] cs & sysname
@ 2003-11-25 13:31 Tiit Lankots
  2003-11-25 13:42 ` David Presotto
  0 siblings, 1 reply; 7+ messages in thread
From: Tiit Lankots @ 2003-11-25 13:31 UTC (permalink / raw)
  To: 9fans

> Also, you could have avoided the problem by setting up a real ip
> address before running cs since it preferentially chose such an
> address.

Yes, but then it chose that ip as my sysname, becasuse it looked
either by ip or alternatively by ether, if ip didn't produce anything.
Case 1).

Tiit 


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

* RE: [9fans] cs & sysname
  2003-11-25 13:31 [9fans] cs & sysname Tiit Lankots
@ 2003-11-25 13:42 ` David Presotto
  0 siblings, 0 replies; 7+ messages in thread
From: David Presotto @ 2003-11-25 13:42 UTC (permalink / raw)
  To: 9fans

I take it then that you don't have a static address but get a dynamicly
assigned one?


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

* Re: [9fans] cs & sysname
  2003-11-25 13:26   ` David Presotto
@ 2003-11-25 16:21     ` Rob Pike
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Pike @ 2003-11-25 16:21 UTC (permalink / raw)
  To: 9fans


> Also, you could have avoided the problem by setting up a real ip
> address before running cs since it preferentially chose such an
> address.
>
right.  just yesterday, due to changes in networking, i switched my
fossil/cpu/auth server from static IP to statically defined DHCP.  all i
had to do was delete a bunch of arguments to ip/ipconfig and track
down and updated all the wired-in IP addresses in the boot scripts.

i never used the loopback address (the line was commented out in
bootfl all along), i just made sure the IP addresses were set properly.

-rob



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

* RE: [9fans] cs & sysname
@ 2003-11-25 13:45 Tiit Lankots
  0 siblings, 0 replies; 7+ messages in thread
From: Tiit Lankots @ 2003-11-25 13:45 UTC (permalink / raw)
  To: 9fans

> I take it then that you don't have a static address but get a 
> dynamicly
> assigned one?

Yep. Luckily for me the server seems to be assigning ip-s
by ethernet addresses.


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

* Re: [9fans] cs & sysname
  2003-11-25 13:08 ` David Presotto
@ 2003-11-25 13:26   ` David Presotto
  2003-11-25 16:21     ` Rob Pike
  0 siblings, 1 reply; 7+ messages in thread
From: David Presotto @ 2003-11-25 13:26 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

I changed and updated libip's myipaddr to totally ignore loopback.  It used
to return a non loopback address if it found one and failing that the
loopback address if it found one.  Now it just errors out if there is
no non-loopback address.

Also, you could have avoided the problem by setting up a real ip
address before running cs since it preferentially chose such an
address.

[-- Attachment #2: Type: message/rfc822, Size: 4755 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 80 bytes --]

I'll fix cs.  It really shouldn't accept the loopback address as the
local one.

[-- Attachment #2.1.2: Type: message/rfc822, Size: 2623 bytes --]

From: "Tiit Lankots" <t.lankots@aprote.ee>
To: <9fans@cse.psu.edu>
Subject: [9fans] cs & sysname
Date: Tue, 25 Nov 2003 14:37:27 +0200
Message-ID: <81132473206F3A46A72BD6116E1A06AE056154@black.aprote.com>

After setting up venti, cs stopped recognising my sysname.
It was because the loopback interface got up first on boot,
and because cs looks first by ip address.

Now, I had two alternative ways to deal with it:
1) Poke around in /sys/src/cmd/ndb/cs.c and edit it to look
by the ethernet address when by ip it did not succeed. 
I did it.
2) Write the ip I get from the dhcp server into /lib/ndb/local.
I did it too.

Now it works. Basically, 2) would've sufficed.
OK, now for the question: Is 2) the "standard" way of dealing
with this? What to do when the ip returned by dhcp
is random?

Tiit

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

* Re: [9fans] cs & sysname
  2003-11-25 12:37 Tiit Lankots
@ 2003-11-25 13:08 ` David Presotto
  2003-11-25 13:26   ` David Presotto
  0 siblings, 1 reply; 7+ messages in thread
From: David Presotto @ 2003-11-25 13:08 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 80 bytes --]

I'll fix cs.  It really shouldn't accept the loopback address as the
local one.

[-- Attachment #2: Type: message/rfc822, Size: 2623 bytes --]

From: "Tiit Lankots" <t.lankots@aprote.ee>
To: <9fans@cse.psu.edu>
Subject: [9fans] cs & sysname
Date: Tue, 25 Nov 2003 14:37:27 +0200
Message-ID: <81132473206F3A46A72BD6116E1A06AE056154@black.aprote.com>

After setting up venti, cs stopped recognising my sysname.
It was because the loopback interface got up first on boot,
and because cs looks first by ip address.

Now, I had two alternative ways to deal with it:
1) Poke around in /sys/src/cmd/ndb/cs.c and edit it to look
by the ethernet address when by ip it did not succeed. 
I did it.
2) Write the ip I get from the dhcp server into /lib/ndb/local.
I did it too.

Now it works. Basically, 2) would've sufficed.
OK, now for the question: Is 2) the "standard" way of dealing
with this? What to do when the ip returned by dhcp
is random?

Tiit

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

* [9fans] cs & sysname
@ 2003-11-25 12:37 Tiit Lankots
  2003-11-25 13:08 ` David Presotto
  0 siblings, 1 reply; 7+ messages in thread
From: Tiit Lankots @ 2003-11-25 12:37 UTC (permalink / raw)
  To: 9fans

After setting up venti, cs stopped recognising my sysname.
It was because the loopback interface got up first on boot,
and because cs looks first by ip address.

Now, I had two alternative ways to deal with it:
1) Poke around in /sys/src/cmd/ndb/cs.c and edit it to look
by the ethernet address when by ip it did not succeed. 
I did it.
2) Write the ip I get from the dhcp server into /lib/ndb/local.
I did it too.

Now it works. Basically, 2) would've sufficed.
OK, now for the question: Is 2) the "standard" way of dealing
with this? What to do when the ip returned by dhcp
is random?

Tiit


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

end of thread, other threads:[~2003-11-25 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-25 13:31 [9fans] cs & sysname Tiit Lankots
2003-11-25 13:42 ` David Presotto
  -- strict thread matches above, loose matches on Subject: below --
2003-11-25 13:45 Tiit Lankots
2003-11-25 12:37 Tiit Lankots
2003-11-25 13:08 ` David Presotto
2003-11-25 13:26   ` David Presotto
2003-11-25 16:21     ` Rob Pike

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