[comp.unix.ultrix] Reassigning IP-adress to boot clients

harbo@diku.dk (Klaus Harbo) (08/07/90)

At our site we have several DEC3100s which all boot from a central server
(also a DEC3100). We have a central administration of our LAN, and they want
us to assign different IP-addresses to some our machines (all of them 
boot-clients).

Unfortunately it is unclear to me how this is done. Actually we don't even
know where the machine gets its own IP-address. I think I know that it gets
it through ARP from the boot server, but where does *it* get it? -- There
must be a file somewhere that contains information about which clients get 
which addresses. (Surely it can't be /etc/hosts ? -- I have tried that, and
doesn't seem to work).

Our local DEC has so far been unable to provide an answer to this question,
which is of course totally unacceptable (and perfectly in line with our
general experiences with DEC Denmark).

The net is my only hope, I'm afraid, so please help me someone!

Thanks in advance.

-Klaus
|--------------------------------------------------------------------------|
|  Klaus Harbo                   |                                         |
|  Euromath Center               | e-mail:               harbo@euromath.dk |  
|  Universitetsparken 5          | phone:           +45 3135 3133 ext. 417 | 
|  DK-2100 Copenhagen            | fax:                      +45 3135 0427 |
|--------------------------------------------------------------------------|




-- 

|--------------------------------------------------------------------------|
|  Klaus Harbo                   |                                         |
|  Euromath Center               | e-mail:               harbo@euromath.dk |  

treese@crl.dec.com (Win Treese) (08/08/90)

In article <1990Aug7.111645.25785@diku.dk> harbo@diku.dk (Klaus Harbo) writes:

   At our site we have several DEC3100s which all boot from a central server
   (also a DEC3100). We have a central administration of our LAN, and they want
   us to assign different IP-addresses to some our machines (all of them 
   boot-clients).

   Unfortunately it is unclear to me how this is done. Actually we don't even
   know where the machine gets its own IP-address. I think I know that it gets
   it through ARP from the boot server, but where does *it* get it? -- There
   must be a file somewhere that contains information about which clients get 
   which addresses. (Surely it can't be /etc/hosts ? -- I have tried that, and
   doesn't seem to work).

Unless you've made lots of local modifications, the easiest thing to do
might be to simply delete and re-install the clients.

Assuming that's not what you want to do, here's a method (assuming you
boot with MOP):

- shut down all the clients
- update /etc/hosts, BIND, and YP as appropriate
- make sure the server has its new address (usually obtained from /etc/hosts)
- reboot the server
- For each client, look in its etc directory on the server.  This is usually
	a path of the form /dlclient0/hostname.root/etc.
- There is a file there called netblk.c.  It is a data structure definition
	defined in <sas/mop.h>.  You'll need to put the 32-bit integer
	representation of the host address for the server in the second
	field, the client address in the 4th field, and the new broadcast
	address and netmask in the fifth and sixth fields.
	(you can write a quick program to do the dotted-quad to number
	conversion using the inet_addr() library routine.
- When you're done editing, execute "cc -c netblk.c" to regenerate the .o
	file, which is used in the boot sequence.
- Boot the client.
- Enjoy.

I think I've covered everything here, but you should go through it carefully
(and for one client to check it).  This is, of course, a completely
*unsupported* procedure.  I've done this before, so it seems to work.

Good luck, and happy hacking.

Win Treese						Cambridge Research Lab
treese@crl.dec.com					Digital Equipment Corp.

thomas@decatlalf.dec.com (Elgin Thomas) (08/08/90)

>At our site we have several DEC3100s which all boot from a central server
>(also a DEC3100). We have a central administration of our LAN, and they want
>us to assign different IP-addresses to some our machines (all of them 
>boot-clients).

>Unfortunately it is unclear to me how this is done. Actually we don't even
>know where the machine gets its own IP-address. I think I know that it gets
>it through ARP from the boot server, but where does *it* get it? -- There
>must be a file somewhere that contains information about which clients get 
>which addresses. (Surely it can't be /etc/hosts ? -- I have tried that, and
>doesn't seem to work).

>Our local DEC has so far been unable to provide an answer to this question,
>which is of course totally unacceptable (and perfectly in line with our
>general experiences with DEC Denmark).

>The net is my only hope, I'm afraid, so please help me someone!

>Thanks in advance.

The DMS clients recieve their IP-address and other information from the server
via the secondary loader.  On the server do the following:

/etc/getnode clientname

node =          CLIENT
        hardware address = 08-00-2b-0e-dd-ee
        load file = netloadudt030.sys
        secondary loader = clients/client
        tertiary loader = vmunixudt030.sys

The file client is located in /usr/lib/dnet/clients.  This directory
also contains the
C source for the file:

/* Client packet for client client
   Copyright (C) 1988
   DIGITAL Equipment Corp.
   Maynard, Massachusetts
*

#include <sas/mop.h>
struct netblk nblk={			
        "server",			/* server hostname (boot server)*/
        0x1048003a,			/* server IP address (boot server)*/
	"client",			/* client hostname */
	0x10480041,			/* client IP address */
	0x104800ff,			/* broadcast address */
	0xffffff00,			/* network mask address */
        0,				/* swap file system type */
        1,				/* root file system type */
        0,				/* swap size in 1/2 Meg units */
        0,				/* dump flag 0-disabled, 1-enabled */
        "dummypath",			/* root filesys descriptor */
        "dummypath",			/* swap file descriptor */
        ""				/* for later use */
};

To change the client IP address you can edit the appropiate fields and then
recompile the C source file for the client.  But, perhaps the easiest way is
to use the /etc/dms script file to modify a client.  This script will
edit the file
and rebuild it automatically.

The only other file that needs to be changed is the /etc/hosts file on
the server.
This file needs to be modified to reflect the new host numbers before running
the /etc/dms script.

Hope this helps,

Elgin Thomas 
Digital Equipment Corp.
Customer Support Center
Ultrix Support Group

obg@sics.se (Olof Backing) (08/08/90)

treese@crl.dec.com (Win Treese) writes:

>In article <1990Aug7.111645.25785@diku.dk> harbo@diku.dk (Klaus Harbo) writes:

>   At our site we have several DEC3100s which all boot from a central server
>   (also a DEC3100). We have a central administration of our LAN, and they want
>   us to assign different IP-addresses to some our machines (all of them 
>   boot-clients).

>   Unfortunately it is unclear to me how this is done. Actually we don't even
>   know where the machine gets its own IP-address. I think I know that it gets
>   it through ARP from the boot server, but where does *it* get it? -- There
>   must be a file somewhere that contains information about which clients get 
>   which addresses. (Surely it can't be /etc/hosts ? -- I have tried that, and
>   doesn't seem to work).

>Unless you've made lots of local modifications, the easiest thing to do
>might be to simply delete and re-install the clients.

>Assuming that's not what you want to do, here's a method (assuming you
>boot with MOP):

>- shut down all the clients
>- update /etc/hosts, BIND, and YP as appropriate
>- make sure the server has its new address (usually obtained from /etc/hosts)
>- reboot the server
>- For each client, look in its etc directory on the server.  This is usually
>	a path of the form /dlclient0/hostname.root/etc.
>- There is a file there called netblk.c.  It is a data structure definition
>	defined in <sas/mop.h>.  You'll need to put the 32-bit integer
>	representation of the host address for the server in the second
>	field, the client address in the 4th field, and the new broadcast
>	address and netmask in the fifth and sixth fields.
>	(you can write a quick program to do the dotted-quad to number
>	conversion using the inet_addr() library routine.
>- When you're done editing, execute "cc -c netblk.c" to regenerate the .o
>	file, which is used in the boot sequence.
>- Boot the client.
>- Enjoy.

>I think I've covered everything here, but you should go through it carefully
>(and for one client to check it).  This is, of course, a completely
>*unsupported* procedure.  I've done this before, so it seems to work.

How 'bout using /etc/dms.new....

>Good luck, and happy hacking.

The same to you!
>Win Treese						Cambridge Research Lab
>treese@crl.dec.com					Digital Equipment Corp.

WHOAMI: Olof Backing                                  EMAIL:
WHERE:  Swedish Institute of Computer Science (SICS)  obg@sics.se
SNAIL:  Professorsslingan 25/102, S-104 05 Stockholm, Sweden
VOICE:  + 46 8 166318