Given what you told me the following should work for me: option host-name = concat("ws-", binary-to-ascii (10,8,leased-address,"-"));
Although I only need the last number in the ipaddress. There is a benifit of having the entire ip address in the hostname. Ok. Where can I find info on doing eval expressions and how dhcp privides info to me. And it looks like I'll be joining another mailing list. Thanks Richard > You do that a lot different then I do. > > I was thinking you entered each machines Mac Address into the conf file. > > That is the only way I know how to do it > > If you do it this way you can still let the IP address be assigned > Dynamically (I sense your after that) > > But you'll have to manually enter IP address and the name would be > statically assigned to the Mac Address. > > For example > > host WS18 { > filename "/lts/nameof.yourfile.here"; > hardware ethernet 00:00:BB:99:AA:A0; > } > > This is the only way I can think of doing it. > > Unless you can make something like this work > > Snippet from dhcpserver mailing list > > The DHCP server automatically derives the hostname if there is some basis > for it to do so - e.g., if the client sent a host-name option. It does > not make up a hostname out of whole cloth. You can do something like this: > > option ddns-hostname = pick (option fqdn.hostname, option host-name, > concat ("foo-", binary-to-ascii (10, 8, > leased-address, "-"))); > > This will take the IP address granted to the client, separate each octet > with a "-", and whack that onto the end of the string "foo-", but only if > the client doesn't provide its own hostname. leased-address probably > doesn't work with fixed-address declarations, though, so if you're > providing the host with a static allocation, you may need to do something > different. > > This is from Ted Lemon. > > > > > -----Original Message----- > > From: Richard Camp [mailto:[EMAIL PROTECTED]] > > Sent: Monday, March 11, 2002 8:20 PM > > To: Egan, Matt B. (Artco) > > Cc: [EMAIL PROTECTED] > > Subject: Re: [Ltsp-discuss] DHCPD not sending hostnames to clients > > > > Here is my dhcpd.conf file > > #start dhcpd.conf > > default-lease-time 21600; > > max-lease-time 21600; > > ddns-update-style none; > > allow booting; > > allow bootp; > > use-host-decl-names on; #doesn't work here either > > > > option subnet-mask 255.255.255.0; > > option broadcast-address 192.168.0.255; > > option routers 192.168.0.254; > > option domain-name-servers 192.168.0.254; > > option domain-name "ltsp"; > > option root-path "192.168.0.254:/opt/ltsp/i386"; > > option option-128 code 128 = string; > > option option-129 code 129 = text; > > > > shared-network WORKSTATIONS { > > subnet 192.168.0.0 netmask 255.255.255.0 { > > range dynamic-bootp 192.168.0.100 192.168.0.253; > > use-host-decl-names on; > > option log-servers 192.168.0.254; > > get-lease-hostnames on; #this didn't help either > > option domain-name "ltsp"; > > # option host-name "host-name"; # this test line works > > # trick from Peter Rundle <[EMAIL PROTECTED]> > > if substring (option vendor-class-identifier, 0, 9) = "PXEClient" > > { > > filename "/lts/pxe/pxelinux.bin"; > > # NOTE: kernels are specified in /tftpboot/lts/pxe/pxelinux.cfg/ > > } > > else > > { > > filename "/lts/vmlinuz-2.4.9-ltsp"; > > } > > } > > } > > # end dhcpd.conf > > > > Retested name server looks with telnet,ping, etc.. It doesn't matter to > > me how I fill in the hostname just as long as it is in the form ws1 to > > ws253. The number of coarse is based on the last number of the ip > address. > > > > Richard > > > > Egan, Matt B. (Artco) wrote: > > > > >>Mosix is getting the IP of the machine based on the value from > $hostname. > > >>If I use a static IP for the terminal and pass the hostname > > >>using "option hostname "ws251" for example everything works. I copied > > the > > >>hosts file from the server to /opt/lts/i386/etc/hosts. No > > >>dynamic address is needed. each ip address is setup in the nameserver. > > I > > >>doesn't matter to me what hardware address gets what ip > > >>address. Each terminal just needs to know the hostname for the ip > > address > > >>it got. > > >> > > >>Hope this helps. > > >> > > > > > > I see > > > > > > Yeah > > > > > > Can I see a snippet from you dhcpd.conf? > > > > > > > > > _____________________________________________________________________ > > > Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: > > > https://lists.sourceforge.net/lists/listinfo/ltsp-discuss > > > For additional LTSP help, try #ltsp channel on irc.openprojects.net > > > > > > > > -- _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.openprojects.net