Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!elroy.jpl.nasa.gov!decwrl!pa.dec.com!hollie.rdg.dec.com!decuk.uvo.dec.com!decuk.uvo.dec.com!sac From: sac@decuk.uvo.dec.com (Stephen A Carpenter) Newsgroups: comp.unix.ultrix Subject: Re: Ultrix diskless client weirdness Message-ID: <1991Feb18.100523@decuk.uvo.dec.com> Date: 18 Feb 91 10:05:23 GMT References: <3501@dali> Sender: usenet@decuk.uvo.dec.com (News Account) Reply-To: sac@decuk.uvo.dec.com (Stephen A Carpenter) Organization: Digital Equipment Corporation Lines: 125 Nntp-Posting-Host: localhost Internet address changes in a diskless environment. ULTRIX V4.0 The Internet address of a diskless client is determined by the network boot block the system send as the secondary load file. This file is initially created by DMS but at the present time DMS does not have the capability to change an existing netblk. NOTE: If you attempt to change the IP address of either the client or server without modifying the netblk then your DISKLESS CLIENTS WILL NOT BOOT. The definition of the network boot block is in /usr/include/sas/mop.h and the netblk structure is shown below. struct netblk { char srvname[32]; /* server hostname (boot server)*/ unsigned long srvipadr; /* server IP address (boot server)*/ char cliname[32]; /* client hostname */ unsigned long cliipadr; /* client IP address */ unsigned long brdcst; /* broadcast address */ unsigned long netmsk; /* network mask address */ short swapfs; /* swap file system type*/ short rootfs; /* root file system type*/ short swapsz; /* swap size in 1/2 Meg units */ short dmpflg; /* dump flag 0 - disabled */ /* 1 - enabled */ char rootdesc[80]; /* root filesys descriptor */ char swapdesc[80]; /* swap file descriptor */ char reserved[20]; /* for later use */ }; In order to change the IP address of the client or of the server you will need to modify the netblk. The code for the boot block is in the file /etc/bootblk.c on the diskless client. An example of this file is: #include struct netblk nblk={ "my_server", 0x10b38001, "my_client", 0x10b3803e, 0x10b380ff, 0xffffff00, 0, 5, 0, 0, "/dlclient0/my_client.root", "rz3b", "" }; A quick cross-reference with the mop include file will tell you which fields represent which data. To change the IP addresses you need to use the command /usr/diskless/makpkt. The format of this command is: makpkt server_IP_addr client_name client_IP_addr broadcast netmask Here is an example of using makpkt to change the network boot block parameters. For a server of address 16.128.128.4 and a client called fred of address 16.128.128.19 on a class B network you'll need to use the command: % makpkt 16.128.19.4 fred 16.128.20.19 16.128.255.255 255.255.0.0 this will produce the output: 0x10801304, "fred", 0x10801413, 0x1080ffff, 0xffff0000, You will now need to edit netblk.c and replace the line 0x10b38001, "my_client", 0x10b3803e, 0x10b380ff, 0xffffff00, with 0x10801304, "fred", 0x10801413, 0x1080ffff, 0xffff0000, The next step is to compile the new netblk. % cc -c netblk.c If you are changing the client IP address then you will also need to modify the CLIARP field in /etc/dlparam on the client. eg. CLIARP="16.182.128.61" Finally you can change the server and/or client IP address on the server and reboot. Stephen Carpenter UK ULTRIX Support -- Stephen Carpenter sac@decuk.uvo.dec.com UK Ultrix Support Digital Equipment Corporation