9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] dns not running
@ 2000-12-04 17:45 forsyth
  2000-12-04 22:05 ` William Staniewicz
  0 siblings, 1 reply; 9+ messages in thread
From: forsyth @ 2000-12-04 17:45 UTC (permalink / raw)
  To: 9fans

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

from the manual page

          Kill prints commands that will cause all processes called
          name and owned by the current user to be terminated.  Use
          the send command of rio(1), or pipe the output of kill into
          rc(1) to execute the commands.

it's not the same as unix.


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

To: cse.psu.edu!9fans
Subject: Re: [9fans] dns not running
Date: Mon, 4 Dec 2000 18:28:20 +0100
Message-ID: <20001204182820.A257@localhost.local>

This worked very nicely and got dns running. However, how do
I kill it off? When I use "kill dns" I get,

	echo kill >/proc/105/note

Then when I check with "ps" ... it shows dns as still there.

Note: In the past, to kill a process or app running in the
window I simply "killed" the window with the mouse. I know this
is probably not the right way to do things but it seems
to have worked up to now. What is the right way to do it?

Bill

On Sat, Dec 02, 2000 at 08:16:16PM -0500, Russ Cox wrote:
> Your problem is not that you're not running ip/ipconfig.
> It is, as you point out, that dns does not start at boot.
> This is by design -- no ip address, no dns.  After using
> ip/ppp to dial your ISP, you should start dns with ndb/dns -r
> (perhaps set DNSSERVER too).  When you're done, kill it off.
> 
> One other thing: in order for this to work you need to
> make the following change to /sys/src/libndb/dnsquery.c
> 
> diff dnsquery.c odnsquery.c
> 44c44
> < 		if(mount(fd, net, MBEFORE, "") < 0)
> ---
> > 		if(mount(fd, net, MAFTER, "") < 0)
> 
> That's line 44, change MAFTER to MBEFORE.
> 
> Then 
> 	cd /sys/src/libndb
> 	mk install
> 	mk clean
> 	cd /sys/src/cmd/ndb
> 	mk install
> 	mk clean
> 
> That will get you a new ndb/cs that will notice the new
> dns once you start it.  (That fix will be in the next
> release.)
> 
> Russ

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

* Re: [9fans] dns not running
  2000-12-04 17:45 [9fans] dns not running forsyth
@ 2000-12-04 22:05 ` William Staniewicz
  0 siblings, 0 replies; 9+ messages in thread
From: William Staniewicz @ 2000-12-04 22:05 UTC (permalink / raw)
  To: 9fans

Yes, it seems simple now ...

term% kill dns|rc

... I just had to unlearn the unix/FreeBSD reflex.

Bill

On Mon, Dec 04, 2000 at 05:45:28PM +0000, forsyth@vitanuova.com wrote:
> from the manual page
> 
>           Kill prints commands that will cause all processes called
>           name and owned by the current user to be terminated.  Use
>           the send command of rio(1), or pipe the output of kill into
>           rc(1) to execute the commands.
> 
> it's not the same as unix.
> 


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

* Re: [9fans] dns not running
  2000-12-03  1:16 Russ Cox
  2000-12-03 20:52 ` Boyd Roberts
@ 2000-12-04 17:28 ` William Staniewicz
  1 sibling, 0 replies; 9+ messages in thread
From: William Staniewicz @ 2000-12-04 17:28 UTC (permalink / raw)
  To: 9fans

This worked very nicely and got dns running. However, how do
I kill it off? When I use "kill dns" I get,

	echo kill >/proc/105/note

Then when I check with "ps" ... it shows dns as still there.

Note: In the past, to kill a process or app running in the
window I simply "killed" the window with the mouse. I know this
is probably not the right way to do things but it seems
to have worked up to now. What is the right way to do it?

Bill

On Sat, Dec 02, 2000 at 08:16:16PM -0500, Russ Cox wrote:
> Your problem is not that you're not running ip/ipconfig.
> It is, as you point out, that dns does not start at boot.
> This is by design -- no ip address, no dns.  After using
> ip/ppp to dial your ISP, you should start dns with ndb/dns -r
> (perhaps set DNSSERVER too).  When you're done, kill it off.
> 
> One other thing: in order for this to work you need to
> make the following change to /sys/src/libndb/dnsquery.c
> 
> diff dnsquery.c odnsquery.c
> 44c44
> < 		if(mount(fd, net, MBEFORE, "") < 0)
> ---
> > 		if(mount(fd, net, MAFTER, "") < 0)
> 
> That's line 44, change MAFTER to MBEFORE.
> 
> Then 
> 	cd /sys/src/libndb
> 	mk install
> 	mk clean
> 	cd /sys/src/cmd/ndb
> 	mk install
> 	mk clean
> 
> That will get you a new ndb/cs that will notice the new
> dns once you start it.  (That fix will be in the next
> release.)
> 
> Russ


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

* Re: [9fans] dns not running
@ 2000-12-03 21:32 presotto
  0 siblings, 0 replies; 9+ messages in thread
From: presotto @ 2000-12-03 21:32 UTC (permalink / raw)
  To: 9fans

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

Same answer, we don't do it.

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

From: "Boyd Roberts" <boyd@planete.net>
To: <9fans@cse.psu.edu>
Subject: Re: [9fans] dns not running
Date: Sun, 3 Dec 2000 22:27:30 +0100
Message-ID: <03fb01c05d6f$d84c3580$0ab9c6d4@cybercable.fr>

> actually, we assign no special meaning to the 127 network in our stack.
> You thinking Unix?

maybe you should think IANA?

    http://www.isi.edu/in-notes/iana/assignments/ipv4-address-space

    127/8  IANA - Reserved    Sep 81


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

* Re: [9fans] dns not running
  2000-12-03 21:08 presotto
@ 2000-12-03 21:27 ` Boyd Roberts
  0 siblings, 0 replies; 9+ messages in thread
From: Boyd Roberts @ 2000-12-03 21:27 UTC (permalink / raw)
  To: 9fans

> actually, we assign no special meaning to the 127 network in our stack.
> You thinking Unix?

maybe you should think IANA?

    http://www.isi.edu/in-notes/iana/assignments/ipv4-address-space

    127/8  IANA - Reserved    Sep 81




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

* Re: [9fans] dns not running
@ 2000-12-03 21:08 presotto
  2000-12-03 21:27 ` Boyd Roberts
  0 siblings, 1 reply; 9+ messages in thread
From: presotto @ 2000-12-03 21:08 UTC (permalink / raw)
  To: 9fans

>you always have an IP address 127.0.0.1 and running
>a dns is always a good idea as long as it implements
>a cache as per BIND.  speeds up DNS lookups.

actually, we assign no special meaning to the 127 network in our stack.
You thinking Unix?

> i've never liked ip/ipconfig.  i like the dns config
> files, but was horrified to learn that it finds the
> hostname (never documented) by ethernet address.

Dns doesn't use the ether address for anything.

The only place we connect an ethernet address and
an ip one is in dhcpd.  We use the ether address to
identify a system that's bootping or dhcping.  That's
only if you're trying to give a static address to a
system.  Since we run our systems diskless (or as close
as we can get) that's the only bit of information that
a bootping system reliably has to identify itself.

ndb/cs will use the ether address to figure out
the system name only if all of the above are true
	1) /env/sysname doesn't contain a name
	2) the ip address doesn't map to a name in the database
	3) dhcp didn't leave a name in /net/ndb


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

* Re: [9fans] dns not running
  2000-12-03  1:16 Russ Cox
@ 2000-12-03 20:52 ` Boyd Roberts
  2000-12-04 17:28 ` William Staniewicz
  1 sibling, 0 replies; 9+ messages in thread
From: Boyd Roberts @ 2000-12-03 20:52 UTC (permalink / raw)
  To: 9fans

From: Russ Cox <rsc@plan9.bell-labs.com>

> Your problem is not that you're not running ip/ipconfig.
> It is, as you point out, that dns does not start at boot.
> This is by design -- no ip address, no dns.

you always have an IP address 127.0.0.1 and running
a dns is always a good idea as long as it implements
a cache as per BIND.  speeds up DNS lookups.

i've never liked ip/ipconfig.  i like the dns config
files, but was horrified to learn that it finds the
hostname (never documented) by ethernet address.

pull the card -- start again.

admittedly my point of view comes from the unix world,
but i do understand that the labs environment is very
different.

a DNS implementation is not to be undertaken lightly.




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

* Re: [9fans] dns not running
@ 2000-12-03  1:16 Russ Cox
  2000-12-03 20:52 ` Boyd Roberts
  2000-12-04 17:28 ` William Staniewicz
  0 siblings, 2 replies; 9+ messages in thread
From: Russ Cox @ 2000-12-03  1:16 UTC (permalink / raw)
  To: 9fans

Your problem is not that you're not running ip/ipconfig.
It is, as you point out, that dns does not start at boot.
This is by design -- no ip address, no dns.  After using
ip/ppp to dial your ISP, you should start dns with ndb/dns -r
(perhaps set DNSSERVER too).  When you're done, kill it off.

One other thing: in order for this to work you need to
make the following change to /sys/src/libndb/dnsquery.c

diff dnsquery.c odnsquery.c
44c44
< 		if(mount(fd, net, MBEFORE, "") < 0)
---
> 		if(mount(fd, net, MAFTER, "") < 0)

That's line 44, change MAFTER to MBEFORE.

Then 
	cd /sys/src/libndb
	mk install
	mk clean
	cd /sys/src/cmd/ndb
	mk install
	mk clean

That will get you a new ndb/cs that will notice the new
dns once you start it.  (That fix will be in the next
release.)

Russ


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

* [9fans] dns not running
@ 2000-12-02 10:30 William Staniewicz
  0 siblings, 0 replies; 9+ messages in thread
From: William Staniewicz @ 2000-12-02 10:30 UTC (permalink / raw)
  To: 9fans

Dns does not appear to be running.

I seem to have IP connectivity:

        term% ip-ping 195.121.1.34
 
        rtt 116334 ^B^us, avg rtt 116334 ^B^us, ttl = 252
        rtt 122158 ^B^us, avg rtt 119246 ^B^us, ttl = 252
        rtt 109938 ^B^us, avg rtt 116143 ^B^us, ttl = 252
        ...(this goes on for several lines)
 
        term% netstat -ni
 
        pkt0     1514  195.121.218.20   /128             193.172.249.11   0          0
        0      0

Also, /srv/dns is missing.

Here is my /rc/bin/termrc,


	#!/bin/rc -x

	# replace FILESERVER with the name of your file server
	# here we start with kfs, your local disk file system
	fileserver=kfs
	host=myhostname
	pass=mypassword
	# replace CPU with the name of your cpu server
	cpu=CPU
	# replace FACEDOM with the local domain to be used in the faces database
	facedom=FACEDOM

	# cs sets sysname
	ndb/cs
	sysname=`{cat /dev/sysname}

	# mount mail uncached
	mount -c /srv/boot /n/termrc.tmp
	bind -c /n/termrc.tmp/mail /mail
	unmount /n/termrc.tmp

	# start ethernet if any; ignore errors
	ip/ipconfig >/dev/null >[2=1]

	ndb/dns -r
	aux/timesync -rL

	switch($terminal){
	case carrera*
		bind -a '#t' /dev
	case *' ss'*
		/bin/bind -a '#w' /dev >/dev/null >[2=1]
		/bin/bind -a '#t' /dev >/dev/null >[2=1]
	case *' magnum'*
		/bin/bind -a '#m' /dev >/dev/null >[2=1]
		/bin/bind -a '#t' /dev >/dev/null >[2=1]
		aux/mouse -dC 0
	case *' indigo'*
		/bin/bind -a '#L' /dev >/dev/null >[2=1]
		/bin/bind -a '#w1' /dev >/dev/null >[2=1]
		/bin/bind -a '#t' /dev >/dev/null >[2=1]
		/bin/bind -a '#A' /dev >/dev/null >[2=1]
	case NCR* 'AT&TNSX'* generic* _MP_* 'alpha apc'*
		for(i in f t m L S)
			/bin/bind -a '#'^$i /dev >/dev/null >[2=1]
		for(disk in /dev/sd??) {
			disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
			for(part in $disk/plan9*)
				if(test -f $part)
					disk/prep -p $part >$disk/ctl >[2]/dev/null
		}
		if(test -f /dev/mousectl){
			switch($mouseport){
			case ps2 ps2intellimouse 0 1 2
				aux/mouse $mouseport

				# parse vgasize into fields
				vgasize=`{echo $vgasize}

				if(! ~ $monitor '' && ! ~ `{cat /dev/user} none){
					aux/vga -l $vgasize
					# turn off hardware acceleration until you know it's ok.
					echo -n 'hwaccel off' >'#v/vgactl' >[2]/dev/null
				}
			}
		}
		if(test -f /dev/sd*/swap){
			x=(`{echo /dev/sd*/swap})
			swap $x(1) >/dev/null >[2=1]
		}
		if(test -f /dev/sd*/dos*){
			dossrv
			c:
		}
	}





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

end of thread, other threads:[~2000-12-04 22:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-04 17:45 [9fans] dns not running forsyth
2000-12-04 22:05 ` William Staniewicz
  -- strict thread matches above, loose matches on Subject: below --
2000-12-03 21:32 presotto
2000-12-03 21:08 presotto
2000-12-03 21:27 ` Boyd Roberts
2000-12-03  1:16 Russ Cox
2000-12-03 20:52 ` Boyd Roberts
2000-12-04 17:28 ` William Staniewicz
2000-12-02 10:30 William Staniewicz

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