> 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 via email to