9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] a small error in /rc/bin/cpurc
Date: Sat,  3 Nov 2007 17:30:09 -0400	[thread overview]
Message-ID: <92d86902c00a0bddee3e7a0f4e649afb@quanstro.net> (raw)
In-Reply-To: <10b109140711031012j6d47e8f9g3ed3fec76a2dc565@mail.gmail.com>

> there is a bad order in initialization of network in /rc/bin/cpurc:
> 
> ndb/dns -r
> ip/ipconfig
> 
> When I boot with these settings I get message:
> 
>          ndb/dns: can't read my ip address
> 
> I suggest to swap these commands.

on plan 9, ndb, not dns is generally required to resolve ip addresses.
to read cpurc, one needs a connection to the fileserver, so at this point
we can resolve files.  if the fs is remote, this means that networking is
already configured.  either way, the local machine's ip address should be
in /lib/ndb/local for dns to find.  each plan 9 host should have an /lib/ndb/local
entry along the lines of

	sys=kremvax ip=9.18.36.72		# required.
		ether=000102030405	# optional, for plan 9 dhcp.
		dom=kremvax.ibm.com	# optional, for dns.

for the standalone machines i have, i typically use the bootargs to set up networking
before the root fs is mounted.this is the plan9.ini from the one machine we have at
coraid that boots stand-alone, the auth server:

	bootfile=sdD0!9fat!9myri
	bootargs=il -d -g 205.185.197.254 ether /net/ether0 205.185.197.99 255.255.255.0
	fs=205.185.197.100
	auth=205.185.197.99
	console=0

by the way, since i can't often remember ether addresses, i wrote
this script to find the pxe .ini file for the named machines:


	#!/bin/rc
	rfork e

	for(i)
		for(ether in `{ndb/query -m sys $1 ether}){
			pxe = /cfg/pxe/$ether
			if(test -e $pxe)
				echo $pxe
		}

- erik


  reply	other threads:[~2007-11-03 21:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 17:12 Antonin Vecera
2007-11-03 21:30 ` erik quanstrom [this message]
2007-11-04 11:18   ` Antonin Vecera
2007-11-04 16:48     ` erik quanstrom
2007-11-05  7:31       ` Antonin Vecera
2007-11-05 10:18 ` arisawa
2007-11-05 14:02   ` Antonin Vecera
2007-11-05 12:59 Joshua Wood
2007-11-05 13:27 ` Antonin Vecera
2007-11-06 21:57 ` maht-9fans
2007-11-05 14:51 Joshua Wood
2007-11-07  3:02 Joshua Wood
2007-11-07  3:17 ` erik quanstrom
2007-11-07  5:51 Joshua Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92d86902c00a0bddee3e7a0f4e649afb@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).