Help me build a Folding Farm

A forum just for SPCR's folding team... by request.

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Tue Dec 16, 2003 5:54 am

Charlie,

As a first pass, I have simplified and formatted your dhcpd.conf file, just to make it more manageable for purposes of discussion.

Code: Select all

# Global Parameters

option routers             192.168.2.200;
option subnet-mask         255.255.255.0;
option domain-name         "sandpit.100akerwood.net";
option domain-name-servers 192.168.2.200;
option broadcast-address   192.168.2.255;
option root-path           "192.168.2.200:/opt/ltsp/i386";

option option-128 code 128 = string;
option option-129 code 129 = text;

default-lease-time 86400;

ddns-update-style ad-hoc;

subnet 192.168.2.0 netmask 255.255.255.0 {
	range 192.168.2.101 192.168.2.151;

	group {
		use-host-decl-names  on;
		option log-servers   192.168.2.200;

      host ws001 {
          hardware ethernet 00:90:27:8E:05:67;
          fixed-address     192.168.2.101;
          filename          "/lts/pxelinux.0";
          option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:... ;
		}

      host ws002 {
          hardware ethernet 00:90:27:BE:B6:4E;
          fixed-address     192.168.2.102;
          filename          "/lts/pxelinux.0";
          option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:... ;
		}

	}

}
I like the way you have grouped the folding clients within a group within a subnet. Grouping them within a specific subnet is something Jason Rabel and Turmelle did not do in their files. It makes it MUCH clearer that the range 192.168.2.101 192.168.2.151 is reserved for the folding clients, and that they will not be assigned to anyone else.

Really, now that I am beginning to see how this file is structured, I am less determined to put the second network card in the folding server, and just put the folding clients on the same physical network with the existing Windows machines. Whereas before it seemed logical and even simpler, it's beginning to look more complicated.

Questions:
  • Can the common lines from the host sections, filename and option vendow-encapsulated-options, be "factored out" and placed in the group "scope"? I believe they can be, but I won't know until I try.
  • Why are fixed IP addresses required for the clients? I have asked this before, and I'm still not convinced it's necessary. Unless they are refered to by host NAME somewhere, then I don't see why a dynamically assigned IP address wouldn't work just as well. It's no big deal to assign one, I just want to know why I'm doing it. BTW, even if they are referred to by name, it should be possible even with dynamically assigned IP addresses. After all, we have named them here in the dhcpd.conf file.
  • I'm still trying to determine what that long string of bytes is all about.
  • I wonder if DHCP is aware of what is in the /etc/hosts file? For example, if /etc/hosts equates an IP address to 'router', can 'router' be used instead of a specific IP address? Is that what use-host-decl-names does?
  • Slightly OT: Will dnsmasq operate as a front-line DNS, such that I can eliminate the hosts files from the Windows machines? I'm guessing yes, but I haven't tried it.
As always, I am not just sitting on my thumbs waiting for an answer, but actively researching these questions myself, but I'm always up for an "easy answer" if anyone has one. Or two or three.

David

CharlieChan
Patron of SPCR
Posts: 198
Joined: Sun Jul 13, 2003 2:57 am
Location: East Anglia, UK

Post by CharlieChan » Tue Dec 16, 2003 7:18 am

David,

I am going to make the following assumptions,

1) one network, 192.168.0.
2) dlink router is gateway to rest of internet, IP 192.168.0.1
3) dynamic IP range 192.168.0.151 to 192.168.0.199
4) farm server IP 192.168.0.200

Code: Select all

# Global Parameters

option routers             192.168.0.1;
option subnet-mask         255.255.255.0;
option domain-name         [network name];
option domain-name-servers 192.168.0.200;
option broadcast-address   192.168.0.255;
option root-path           "192.168.0.200:/opt/ltsp/i386";

option option-128 code 128 = string;
option option-129 code 129 = text;

default-lease-time 86400;

ddns-update-style ad-hoc;

subnet 192.168.2.0 netmask 255.255.255.0 {
	range 192.168.0.151 192.168.0.199;

	group {
		use-host-decl-names  on;
		option log-servers   192.168.0.200;

      host ws001 {
          hardware ethernet 00:90:27:8E:05:67;
          fixed-address     192.168.0.101;
          filename          "/lts/pxelinux.0";
          option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:... ;
		}

      host ws002 {
          hardware ethernet 00:90:27:BE:B6:4E;
          fixed-address     192.168.0.102;
          filename          "/lts/pxelinux.0";
          option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:... ;
		}

	}

}
On the farm server the /etc/resolv.conf needs the following,

Code: Select all

search [network name]
nameserver 192.168.0.200
nameserver 192.168.0.1
I like the way you have grouped the folding clients within a group within a subnet. Grouping them within a specific subnet is something Jason Rabel and Turmelle did not do in their files. It makes it MUCH clearer that the range 192.168.2.101 192.168.2.151 is reserved for the folding clients, and that they will not be assigned to anyone else.
No. That is range assigned to dynamic IPs. There was a error in the dhcpd.conf I posted.
Really, now that I am beginning to see how this file is structured, I am less determined to put the second network card in the folding server, and just put the folding clients on the same physical network with the existing Windows machines. Whereas before it seemed logical and even simpler, it's beginning to look more complicated.
To be honest that is how I started having everthing on one network. It is only when I move the farm to the garage that I put it on a subnet.
Can the common lines from the host sections, filename and option vendow-encapsulated-options, be "factored out" and placed in the group "scope"? I believe they can be, but I won't know until I try.
I have never tried it. You could try let me know :D .
Why are fixed IP addresses required for the clients? I have asked this before, and I'm still not convinced it's necessary. Unless they are refered to by host NAME somewhere, then I don't see why a dynamically assigned IP address wouldn't work just as well. It's no big deal to assign one, I just want to know why I'm doing it. BTW, even if they are referred to by name, it should be possible even with dynamically assigned IP addresses. After all, we have named them here in the dhcpd.conf file.
Thinking..... I guest it should possible to use dynamic IP but if you do how will the farm server know which machine is the farm client and which is your XP machines?
I'm still trying to determine what that long string of bytes is all about.
Without this string you will need to boot with a floppy disk. Which is why I guest it is the boot loader.
I wonder if DHCP is aware of what is in the /etc/hosts file? For example, if /etc/hosts equates an IP address to 'router', can 'router' be used instead of a specific IP address?
No, that job belongs to the DNS.
Is that what use-host-decl-names does?
I am not sure what this is.
Slightly OT: Will dnsmasq operate as a front-line DNS, such that I can eliminate the hosts files from the Windows machines? I'm guessing yes, but I haven't tried it.
Yes.

Charlie.

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Tue Dec 16, 2003 1:46 pm

CharlieChan wrote:On the farm server the /etc/resolv.conf needs the following,

Code: Select all

search [network name]
nameserver 192.168.0.200
nameserver 192.168.0.1
I believe this can also be specified in the dhcpd.conf file, in option domain-name-servers, but perhaps other apps need the /etc/resolv.conf file.
David_Hays wrote:I like the way you have grouped the folding clients within a group within a subnet. Grouping them within a specific subnet is something Jason Rabel and Turmelle did not do in their files. It makes it MUCH clearer that the range 192.168.2.101 192.168.2.151 is reserved for the folding clients, and that they will not be assigned to anyone else.
CharlieChan wrote:No. That is range assigned to dynamic IPs. There was a error in the dhcpd.conf I posted.
I mean how the group was in the 'scope' of a specific IP range.
David_Hays wrote:Why are fixed IP addresses required for the clients?...
Charlie Chan wrote:Thinking..... I guest it should possible to use dynamic IP but if you do how will the farm server know which machine is the farm client and which is your XP machines?
MAC address. Basically, any host that does not have a MAC address explicitly specified would get a dynamic IP address within another range.
David_Hays wrote:I'm still trying to determine what that long string of bytes is all about.
CharlieChan wrote:Without this string you will need to boot with a floppy disk. Which is why I guest it is the boot loader.
Ah, something to do with PXE then?
David_Hays wrote:I wonder if DHCP is aware of what is in the /etc/hosts file? For example, if /etc/hosts equates an IP address to 'router', can 'router' be used instead of a specific IP address?
CharlieChan wrote:No, that job belongs to the DNS.
Yes, but isn't there a 'hierarchy' of how these services are arranged, such that one service can use another? Domain names can definitely be used inside the dhcpd.conf file. I just don't know where the IP addresses for those domain names are resolved. I need someone to draw me a picture of how dnsmask is related to dhcp is related to the services my broadband router provides.
David_Hays wrote:Is that what use-host-decl-names does?
CharlieChan wrote:I am not sure what this is.
I found a reference so it. It would cause the host name to be returned to the machine with the specified MAC address, so that it would know it was, for example, ws001. It's apparently not supported very well, which I guess is why the hosts file would still be necessary? I don't know. The documentation on the 'option' fields is not very helpful.

David

CharlieChan
Patron of SPCR
Posts: 198
Joined: Sun Jul 13, 2003 2:57 am
Location: East Anglia, UK

Post by CharlieChan » Tue Dec 16, 2003 3:23 pm

CharlieChan wrote:On the farm server the /etc/resolv.conf needs the following,

Code: Select all

search [network name]
nameserver 192.168.0.200
nameserver 192.168.0.1
I believe this can also be specified in the dhcpd.conf file, in option domain-name-servers, but perhaps other apps need the /etc/resolv.conf file.
When a farm client or XP client request a IP and/or DNS IP from the server, the information is given according to the parameters in the dhcpd.conf. You would normally want the clients to query the farmer server for DNS request so that the clients knows about the PC on the local network. When a DNS request is not found locally the farmer server request information from the route which in turn request the information from your ISP's DNS servers. I record DNSMASQ works by first querying the hosts file then the DNS server store in the resolv.conf. I may be wrong but the reason I put the line nameserver 192.168.0.200 is to tell dnsmasq to query the hosts file first before querying the router.
David_Hays wrote:Why are fixed IP addresses required for the clients?...
Charlie Chan wrote:Thinking..... I guest it should possible to use dynamic IP but if you do how will the farm server know which machine is the farm client and which is your XP machines?
MAC address. Basically, any host that does not have a MAC address explicitly specified would get a dynamic IP address within another range.
I am not sure what you mean. When a client request a IP address the dhcpd server first matches the MAC address of the client to the ones its knows about. If none is found it is assigned a dynamic IP specified in the range parameter. Your farm clients must have the names starting ws... as this name is then used by NFS to mount the drives on the farm server. If you use dynamic IPs for the farm clients say in the range 192.168.0.100 to 192.168.0.105 then your other PC's must not use this range, ie they must have static IP's or IP's assigned using MAC addresses.
David_Hays wrote:I wonder if DHCP is aware of what is in the /etc/hosts file? For example, if /etc/hosts equates an IP address to 'router', can 'router' be used instead of a specific IP address?
CharlieChan wrote:No, that job belongs to the DNS.
Yes, but isn't there a 'hierarchy' of how these services are arranged, such that one service can use another? Domain names can definitely be used inside the dhcpd.conf file. I just don't know where the IP addresses for those domain names are resolved. I need someone to draw me a picture of how dnsmask is related to dhcp is related to the services my broadband router provides.
I may have answer this question already. The DNS server basically create names alias to IPs so instead of ping 192.168.0.101 you can ping ws001. This is important as the name is used to mount the drives in NFS. If you switch dnsmasq off using /etc/rc.d/init/dnsmasq stop, you wound not longer be able to ping ws001 but ping 192.168.0.101 would work. You could also run the DNS on another machine so long as the name alias are correct.
David_Hays wrote:Is that what use-host-decl-names does?
CharlieChan wrote:I am not sure what this is.
I found a reference so it. It would cause the host name to be returned to the machine with the specified MAC address, so that it would know it was, for example, ws001. It's apparently not supported very well, which I guess is why the hosts file would still be necessary? I don't know. The documentation on the 'option' fields is not very helpful.
I just query the help file for dhcpd.conf using 'man dhcpd.conf' and is says

group {
use-host-decl-names on;

host joe {
hardware ethernet 08:00:2b:4c:29:32;
fixed-address joe.fugue.com;
}
}

is equivalent to

host joe {
hardware ethernet 08:00:2b:4c:29:32;
fixed-address joe.fugue.com;
option host-name "joe";
}


so just saves on typing for every client. When you say not well supported do you mean by Windows. I always want my PC running Windows to get the client names and workgroup from a server. May this is the answer, some how I doubt it. I think the answer lies in samba.

Charlie.

Zyzzyx
Friend of SPCR
Posts: 1063
Joined: Mon Dec 23, 2002 12:55 pm
Location: Richland, WA
Contact:

Post by Zyzzyx » Tue Dec 16, 2003 10:43 pm

This is going to be one great resource thread when I finally get around to doing my own farm someday. Probably end up printing it out and reading it over and over. ;)

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Tue Dec 16, 2003 11:20 pm

Speaking of reading over and over, I keep wading into Jason Rabel's Building A diskless Folding @ Home Farm and I keep getting in over my head. I'm still working on it.

Another resource that I've gotten bogged down in, and even quicker than with Jason's work, is Diskless Boot Setup for The Prime Monster and the Seti Monster - version 2.

Mark Foster's Build your own Folding Farm is the most approachable of all the articles I have come across, but didn't get into the nitty gritty. Too bad it didn't become the "series" he alluded to in that first paper.

IMO, the best balanced guide is Turmelle's [H]ardFolding Diskless Farm. It's brief, current (most recent update this month), includes a download including all of his configuration files, and the author is available to answer questions ([H]ard|Forum).

It's not specific to folding, but I've found the Linux Magazine article Network Booting to help take some of the mystery out of that subject.

And finally, Ivoshiee's finstall, the most painless way to get Folding@Home up and running under Linux. What it does "is not rocket science" but it is a very useful script, and continues to evolve. The latest version supports Mac OS X, BSD, and WINE. Highly recommended.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Tue Dec 16, 2003 11:56 pm

CharlieChan wrote:When a client request a IP address the dhcpd server first matches the MAC address of the client to the ones its knows about. If none is found it is assigned a dynamic IP specified in the range parameter. Your farm clients must have the names starting ws... as this name is then used by NFS to mount the drives on the farm server. If you use dynamic IPs for the farm clients say in the range 192.168.0.100 to 192.168.0.105 then your other PC's must not use this range, ie they must have static IP's or IP's assigned using MAC addresses.
My thought was to assign static IP addresses to all machines on the network, but do it via DHCP rather than hard-coding it into each client machine's TCP/IP configuration and hosts file. As far as the clients are concerned, they are getting a dynamically assigned IP address, but in fact the DHCP server will always assign them the same IP address, based on their MAC address.

Whether the IP addresses are static or dynamic isn't really the point. What I wish to achieve is the ability to refer to every machine by name rather than by IP address. I.e. precisely the goal of a Name Server. I don't want to hard-code IP addresses in any more places than is absolutely necessary. I'm hoping not to hard-code IP addresses anywhere on any of the Windows machines, not in their TCP/IP config nor in the hosts file. And even on the server, I wish to minimize the number of places I have to hard-code IP addresses.

The way I see it, the Name Server (in my case dsnmasq) should be the only place where IP addresses are hard-coded. This would be /etc/hosts. DHCP should be able to use the Name Server to resolve the names fahserv, ws001, ws002, as well as the names of my Windows machines.


Does this sound reasonable and do-able, or am I (still) living in a fantasy land?

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Wed Dec 17, 2003 12:23 am

Couldn't I define ws001 in /etc/hosts and then do this:

Code: Select all

group { 
  use-host-decl-names on; 

  host ws001 { 
    hardware ethernet 08:00:2b:4c:29:32; 
    fixed-address     ws001; 
  } 
}
:?:

Since the name ws001 would be resolved by the name server, would I even have to say 'host ws001 {' or could I just say 'host {' ? I.e. Is a host name required? I don't see why it would be since a host name isn't required in order to assign a dynamic IP address, so why should it be required to assign a fixed one?

BTW, I would structure dhcpd.conf a bit differently...

Code: Select all

group { 
  use-host-decl-names on; 

  host ws001 { hardware ethernet 00:00:00:00:00:00; fixed-address ws001; } 
  host ws002 { hardware ethernet 00:00:00:00:00:00; fixed-address ws002; } 
  host ws003 { hardware ethernet 00:00:00:00:00:00; fixed-address ws003; } 
}
/etc/hosts

Code: Select all

192.168.1.101  ws001
192.168.1.102  ws002
192.168.1.103  ws003
I might have to include a domain name in the hosts file. It's not required in Windows, but it might be in Linux.
192.168.1.101 ws001.davidhays.com ws001

BTW, is anything sacred about the prefix 'ws'? Can my clients be fah001, fah002, and so on, or is the ws prefix something that is hard-coded in LTSP? It wouldn't be worth a recompile just to change the names.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Wed Dec 17, 2003 4:01 am

I decided to make the leap and fire up the DHCP server. I turned the one in the Dlink router off. And NOTHING worked. I mean I broke EVERYTHING. For a time I couldn't even connect to the router to turn DHCP back on!

I am back up now, but my ego is lying in pieces at my feet.

I thought I had a plan. I had nothing. I didn't have a CLUE.

Somehow I need to take this in smaller steps, testing, verifying, and perhaps even documenting (!) as I go. What a humbling experience.

David

wussboy
Posts: 635
Joined: Wed Oct 23, 2002 12:34 pm
Location: Southampton, UK

Post by wussboy » Wed Dec 17, 2003 7:38 am

haysdb wrote:I decided to make the leap and fire up the DHCP server. I turned the one in the Dlink router off. And NOTHING worked. I mean I broke EVERYTHING. For a time I couldn't even connect to the router to turn DHCP back on!

I am back up now, but my ego is lying in pieces at my feet.

I thought I had a plan. I had nothing. I didn't have a CLUE.

Somehow I need to take this in smaller steps, testing, verifying, and perhaps even documenting (!) as I go. What a humbling experience.

David
Ouch. Sounds like my last date.

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Wed Dec 17, 2003 11:15 am

:lol:

I'm still trying to assess what went wrong. Besides everything, I mean. Thinking about it in the light of day (literally), the difference between something working and not working is the very smallest of things, so I may have been 'close'. Or I could have been 'not even close', I really have no idea.

I think for my next try, I am going to take a REAL close look at Charlie's configuration files, which he listed earlier in this post, and save my experimentation for when I have it 'working' and can then try things one step at a time, documenting as I go, so I know what to undo should something break. Last night I played '52 card pickup' and then didn't know what to do when it didn't work.

In fact, toward the end of my ordeal, I was in my Dlink router's setup screens and discovered I had no IP Address on the WAN. I.e., I had no internet connection. So I don't know if maybe things didn't work because my cable company just decided to reboot their server just as I was starting my switchover. It might be a good idea for me not to try it a 2 AM next time.

I'm rambling. OK, here's a QUESTION:

How can I go about testing and verifying my dhcpd.conf file? When it doesn't work, where does one look for clues? A log file? Some kind of tester utility? And here's another:

How can I convince XP to give up its lease on an IP address? I tried "Repairing" the connection. I tried setting the system clock forward one year. I rebooted. And still, XP would (seemingly) not go back to fetch another lease. I'm looking for "DHCP Release" and "DHCP Renew" like my DLink router has.

David

Zyzzyx
Friend of SPCR
Posts: 1063
Joined: Mon Dec 23, 2002 12:55 pm
Location: Richland, WA
Contact:

Post by Zyzzyx » Wed Dec 17, 2003 11:46 am

How can I convince XP to give up its lease on an IP address?
At a 'DOS' command prompt: "ipconfig /renew"

"Ipconfig /all" will show you your current Windows IP information.

CharlieChan
Patron of SPCR
Posts: 198
Joined: Sun Jul 13, 2003 2:57 am
Location: East Anglia, UK

Post by CharlieChan » Wed Dec 17, 2003 12:58 pm

haysdb wrote: I think for my next try, I am going to take a REAL close look at Charlie's configuration files, which he listed earlier in this post, and save my experimentation for when I have it 'working' and can then try things one step at a time, documenting as I go, so I know what to undo should something break. Last night I played '52 card pickup' and then didn't know what to do when it didn't work.
I have been trying to convince you to do this.
In fact, toward the end of my ordeal, I was in my Dlink router's setup screens and discovered I had no IP Address on the WAN. I.e., I had no internet connection. So I don't know if maybe things didn't work because my cable company just decided to reboot their server just as I was starting my switchover. It might be a good idea for me not to try it a 2 AM next time.
I know the feeling. You always blame yourself when in fact it was someone else.
How can I go about testing and verifying my dhcpd.conf file? When it doesn't work, where does one look for clues? A log file? Some kind of tester utility? And here's another:
I would go about solving the problem like this,

1) Connect you server to a hub with no other PC on it. Leave you dlink router alone as you will need a internet connection to get help.
2) Boot your server and make sure the dhcp and dns daemon are running with /etc/rc.d/init/dnsmasq status, /etc/rc.d/init/dhcpd status.
3) If they are not running turn them on with above but replace status with start.
4) Ensure the server has fix IP with ipconfig.
5) Connect a PC to the hub and boot. It does not matter which OS it is running. If XP used command Zyzzyx suggested if Linux use ifconfig.
6) If the PC did not get a IP from the server strip the dhcpd.conf to the most basic,

Code: Select all

option routers             192.168.0.1;
option subnet-mask         255.255.255.0;
option domain-name         davidhays.com;
option domain-name-servers 192.168.0.200;
option broadcast-address   192.168.0.255;
#option root-path           "192.168.0.200:/opt/ltsp/i386";

option option-128 code 128 = string;
option option-129 code 129 = text;

default-lease-time 86400;

ddns-update-style ad-hoc;

subnet 192.168.2.0 netmask 255.255.255.0 {
   range 192.168.0.151 192.168.0.199; 
}
Restart dhcpd daemon with /etc/rc.d/init/dhcpd restart

I do not how many PC's you have running but having one working PC connected to the dlink and 2 other PC's experimenting is best. Try the above and see what happens.

Charlie.

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Wed Dec 17, 2003 7:12 pm

Charlie,

I am stubborn and I'm slow, and I can't begin to tell you how much I appreciate your help.

Thanks to Zyzzyx too.

David


Hey, I'm up to 41st place on the team, soon to be 40th. They say you can't propel yourself forward with a pat on the back, but it doesn't stop me from doing it. :D With the new "blades", maybe I can challenge Frank Condron and mas92264, and maybe someday, when I grow up, frolic with Cosine and tangled and, who knows, maybe someday even that CharlieChan guy. :P

sbabb
*Lifetime Patron*
Posts: 327
Joined: Tue Aug 19, 2003 10:04 am
Location: New Hampshire, USA

Post by sbabb » Wed Dec 17, 2003 8:20 pm

Uh oh. Sounds like it won't be long before you blow by me like Frank and mas did this week. They were going so fast I think they red-shifted!

C'mon FedEx! Deliver my NewEgg order so I can upgrade my kids machines (and my ex-wife's electric bill :twisted: )

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Wed Dec 17, 2003 11:55 pm

Yeah I'm on your threats list for March of next year, but "the farm" should bring that date a bit closer, and when that day arrives, I hope to be going just as fast as Frank and mas. Your conquest will be more satisfying than most, since you are one of the teams top producers (14th highest PPW). Passing these gray and white guys isn't nearly so much fun as passing those green guys like Mormakil, and to pass a fellow yellow guy? That'd be special. Orange guy? Priceless. :) Right now the later is "in my dreams", but it could happen. tangled maybe? :twisted:

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Thu Dec 18, 2003 8:36 am

I am up and running on dhcpd (DHCP server) and dnsmasq (name server). It's not perfect, but it is working.
  • The Windows XP machines are set up for purely automatic configuration. No IP addresses in the TPC/IP config and no hosts files. And yet I can ping the host names router, pcnut, htpc, psc, and fahserv from any machine, courtesy of dnsmasq.
  • The /etc/hosts file contains just two additional entries beyond the standard 127.0.0.1 entry, one for the DLink router and one for the server itself. I'm not sure either one is strictly necessary, but it does allow me to refer to them by name rather than IP address.
  • I am still playing with the dhcp.conf file, but I believe a few of the more arcane lines are not necessary. For example, the following two lines are only necessary if you have ISA network cards. option-128 is for some magic code used by Etherboot and option-129 would contain the name of the ISA NIC driver.
    option option-128 code 128 = string;
    option option-129 code 129 = text;
  • Another line that may not be necessary with newer NIC's is the vendor-encapsulated-options line. The long string of hex digits in that field is some kind of "PXE magic" that recent releases of PXE do not require. That's what I read anyway. I won't know for sure until I get a client running.
Here are just a few of the dumb things I did last night:
  • Set the network card in the server to get it's IP address via DHCP, i.e. from itself. For some reason that didn't work very well. :?
  • Plugged my cable modem into one of the LAN ports rather than the WAN port, then wondered why the heck my router was picking up a 192.168.1.xx address :!:
There were more, but those are the "highlights". :oops:

David

CharlieChan
Patron of SPCR
Posts: 198
Joined: Sun Jul 13, 2003 2:57 am
Location: East Anglia, UK

Post by CharlieChan » Thu Dec 18, 2003 12:35 pm

haysdb wrote:I am up and running on dhcpd (DHCP server) and dnsmasq (name server). It's not perfect, but it is working.
  • The Windows XP machines are set up for purely automatic configuration. No IP addresses in the TPC/IP config and no hosts files. And yet I can ping the host names router, pcnut, htpc, psc, and fahserv from any machine, courtesy of dnsmasq.

    The /etc/hosts file contains just two additional entries beyond the standard 127.0.0.1 entry, one for the DLink router and one for the server itself. I'm not sure either one is strictly necessary, but it does allow me to refer to them by name rather than IP address.
Have a look at the file /var/lib/dhcp/dhcpd.leases. You will see in this file all dynamic IP's allocated by the dhcp server together with various information. One piece of information is the name given by client, that is why it is possible to ping the name of PC's even if the name is not store in /etc/hosts file. If a PC does not give a name that field will be left blank. I am not sure if pinging the client name will work if the dns/dnsmasq server if off - you can try.
I am still playing with the dhcp.conf file, but I believe a few of the more arcane lines are not necessary. For example, the following two lines are only necessary if you have ISA network cards. option-128 is for some magic code used by Etherboot and option-129 would contain the name of the ISA NIC driver.
option option-128 code 128 = string;
option option-129 code 129 = text;
The dhcpd.conf file I posted evolved from a tutorial I follow a long time ago when I was learning how to setting up a dhcp server. There is probably redundant information in it but as it worked I did not bother to fix it.
Another line that may not be necessary with newer NIC's is the vendor-encapsulated-options line. The long string of hex digits in that field is some kind of "PXE magic" that recent releases of PXE do not require. That's what I read anyway. I won't know for sure until I get a client running.
Interesting, let me know how you get on.

Do forget to ensure you nfs and tftp server is running before you boot a client.

Charlie.

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Thu Dec 18, 2003 7:05 pm

A box arrived today, but I didn't check to see what was in it. The thing that's holding me up (but not really) is the cpu heatsink I failed to order for my first board.

I say "but not really" because before I get to the network boot, I have got to figure out why my desktop machine all of a sudden won't connet to the Internet. I can connect from the Linux server and from another XP machine on the network, but not from the desktop. It's a full partner on the LAN, but it can't see past the router. It's like it doesn't have a name server. I tried hard-coding the IP addresses into the TCP/IP config, eliminating the Linux DHCP and Name servers from the equation, but it still doesn't work. I am so out of ideas that I am considering a clean install of XP. The harsh thing is I have SO many apps on that machine, that reinstalling all of them is going to be time-consuming. On the other hand, that'll let me get rid of a lot of garbage too, especially crud accumulated in the registry that could be causing god-knows-what kinds of problems.

Anyway, that's OT for this thread, but that task carries a higher priority than "the farm", so it is related in that way. Basically every other machine is optional, but MY computer has to be up and running, and right now it is very very sick.

David

CharlieChan
Patron of SPCR
Posts: 198
Joined: Sun Jul 13, 2003 2:57 am
Location: East Anglia, UK

Post by CharlieChan » Thu Dec 18, 2003 7:08 pm

David,

Can you list the output from 'ipconfig /all' on one of the XP machines.

Charlie.
Last edited by CharlieChan on Thu Dec 18, 2003 7:16 pm, edited 1 time in total.

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Thu Dec 18, 2003 7:11 pm

CharlieChan wrote:Have a look at the file /var/lib/dhcp/dhcpd.leases. You will see in this file all dynamic IP's allocated by the dhcp server together with various information. One piece of information is the name given by client, that is why it is possible to ping the name of PC's even if the name is not store in /etc/hosts file. If a PC does not give a name that field will be left blank. I am not sure if pinging the client name will work if the dns/dnsmasq server if off - you can try.
You make a good point. I need to stop the dnsmasq service so I can see just what services it is and is not providing to the LAN. I suspect it's not doing as much as I think. In fact, I can't even prove that it's working at all. The reason I say that is even though I have logging turned on, I am not seeing some expected messages in the log /var/logs/messages. I see messages that it started and that it read in the various files, including the dhcpd.leases file and a resolv.dnsmasq file I created, but I get no messages about names it resolved into IP addresses. That leads me to believe it might not actually be DOING anything. OTOH, maybe it's writing THOSE messages somewhere else, but if it is, it's not anywhere in /var/logs.

I may try running dnsmasq in "debug mode" and see what happen. I assume it just dumps a lot of messages to stdout, but I don't know.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 12:53 am

CharlieChan wrote:...list the output from 'ipconfig /all' on one of the XP machines.

Code: Select all

C:\Documents and Settings\Administrator>ipconfig/all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : psc
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : davidhays.com
        Description . . . . . . . . . . . : Intel(R) PRO/1000 CT Network Connection
        Physical Address. . . . . . . . . : 00-0C-6E-CE-1C-32
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.1.11
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.1
        DHCP Server . . . . . . . . . . . : 192.168.1.100
        DNS Servers . . . . . . . . . . . : 192.168.1.100
        Lease Obtained. . . . . . . . . . : Friday, December 19, 2003 1:00:14 AM
        Lease Expires . . . . . . . . . . : Friday, December 19, 2003 7:00:14 AM
.1 is the D-Link router
.100 is the Linux server

This is from one of the machines that works, but the configuration is identical on the machine that doesn't, accept for the things which SHOULD be different, like Host Name and IP Address.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 2:02 am

I stopped the dnsmasq (name) service and restarted it "manually" with the -d option (/usr/sbin/dsnmasq -r) to enable "debug mode".

I'm certain that this is a clue, but I don't know what to make of it. The following 4 lines are being repeated a few times a minute:

Code: Select all

dnsmasq: query 10.1.168.192.in-addr.arpa from 127.0.0.1
dnsmasq: DHCP 192.168.1.10 is pcnut
dnsmasq: query pcnut.davidhays.com from 127.0.0.1
dnsmasq: cached pcnut.davidhays.com is 216.21.229.209
First, what's that IP address for pcnut.davidhays.com?!
Second, why isn't my own name server translating this name? Somehow it must not be picking it up from the dhcpd.leases file.

After a few minutes I entered 'kill -s SIGUSR1 <pid>' to signal dnsmasq to dump it's cache. The lines marked with a * are my local machines.

Code: Select all

dnsmasq:  Host                                Address         Flags     Expires
*dnsmasq: pcnut.davidhays.com                 216.21.229.209  4F        Fri Dec 19 08:35:24 2003
 dnsmasq: jcde-nms3.joltid.net.davidhays.com  216.21.229.209  4F        Sat Dec 20 03:14:00 2003
 dnsmasq: www.em-dc.com                       216.168.224.70  4F        Fri Dec 19 04:39:48 2003
*dnsmasq: psc                                 192.168.1.11    4FR D     Fri Dec 19 06:59:44 2003
*dnsmasq: fahserv.davidhays.com               192.168.1.100   4FRI   H
 dnsmasq: localhost                           127.0.0.1       4F I   H
 dnsmasq: jcde-nms9.joltid.net.davidhays.com  216.21.229.209  4F        Sat Dec 20 03:14:07 2003
 dnsmasq: jcde-nms10.joltid.net                               4F   NX   Fri Dec 19 03:30:23 2003
 dnsmasq: router                              192.168.1.1     4F I   H
*dnsmasq: pcnut                               192.168.1.10    4FR D     Fri Dec 19 09:07:13 2003
 dnsmasq: jcde-nms1.joltid.net                80.160.91.2     4F        Fri Dec 19 03:32:27 2003
 dnsmasq: jcde-nms2.joltid.net                217.212.240.10  4F        Fri Dec 19 03:55:15  2003
 dnsmasq: jcde-nms3.joltid.net                                4F   NX   Fri Dec 19 03:30:52 2003
 dnsmasq: jcde-nms4.joltid.net                80.160.91.3     4F        Fri Dec 19 03:54:43 2003
 dnsmasq: jcde-nms5.joltid.net                80.160.91.19    4F        Fri Dec 19 03:32:32 2003
*dnsmasq: HTPC                                192.168.1.17    4FR D     Fri Dec 19 07:46:51 2003
*dnsmasq: fahserv                             192.168.1.100   4F I   H
 dnsmasq: jcde-nms6.joltid.net                80.160.91.20    4F        Fri Dec 19 04:09:25 2003
 dnsmasq: jcde-nms7.joltid.net                66.36.229.80    4F        Fri Dec 19 03:53:31 2003
 dnsmasq: jcde-nms8.joltid.net                66.36.231.77    4F        Fri Dec 19 03:32:38 2003
 dnsmasq: jcde-nms10.joltid.net.davidhays.com 216.21.229.209  4F        Fri Dec 19 09:35:36 2003
 dnsmasq: jcde-nms9.joltid.net                                4F   NX   Fri Dec 19 03:58:29 2003
 dnsmasq: home.comcast.net                    204.127.198.24  4F        Fri Dec 19 04:02:20 2003
*dnsmasq: router.davidhays.com                192.168.1.1     4FRI   H
*dnsmasq: localhost.localdomain               127.0.0.1       4FRI   H
What I strongly suspect is happening is that davidhays.com, which is something I just "made up" because it seemed like I needed a domain name, is being passed upstream to the router and on to my ISP's name servers, and that there really is a davidhays.com registered to someone.
  1. I did not expect the domain name to "get loose" like that. mmm wait a minute, I wonder is I can prevent that by entering that domain name in my D-Link? I'll have to investigate that.
  2. Why is it that just the one machine, pcnut, is effected, and not psc or fahserv? Could the "real" davidhays.com have a host with that name? Wouldn't THAT be a collosal coincidence?
  3. I'd prefer to avoid the problem altogether. Should I just ditch the domain name altogether, make up a new one, or use "localdomain"? I run some device control software on my Windows machines which I believe requires a domain name, so I think I need to have one, but what should it be to avoid any possible conflict with a "real" domain name?
David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 2:10 am

My name server is definitely not resolving these local host names. From the Linux machine I did a 'ping psc" and dnsmasq responded with:

Code: Select all

dnsmasq: query psc.davidhays.com from 127.0.0.1
dnsmasq: forwarded psc.davidhays.com to 192.168.1.1
dnsmasq: reply psc.davidhays.com is 216.21.229.209
Adding davidhays.com to the local domain name box in my router setup didn't help. I'm looking at the dhcpd.leases file now for clues.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 2:17 am

/var/lib/dhcp/dhcpd.leases

Code: Select all

lease 192.168.1.17 {
  starts 5 2003/12/19 07:46:51;
  ends 5 2003/12/19 13:46:51;
  binding state active;
  next binding state free;
  hardware ethernet 00:07:e9:71:ed:2d;
  uid "\001\000\007\351q\355-";
  client-hostname "HTPC";
}
lease 192.168.1.10 {
  starts 5 2003/12/19 09:07:13;
  ends 5 2003/12/19 15:07:13;
  binding state active;
  next binding state free;
  hardware ethernet 00:50:8d:fd:55:b6;
  uid "\001\000P\215\375U\266";
  client-hostname "pcnut";
}
lease 192.168.1.11 {
  starts 5 2003/12/19 09:59:43;
  ends 5 2003/12/19 15:59:43;
  binding state active;
  next binding state free;
  hardware ethernet 00:0c:6e:ce:1c:32;
  uid "\001\000\014n\316\0342";
  client-hostname "psc";
}
It looks just like I would expect, but apparently not like dnsmasq expects. Mayby I'm missing something from my dhcpd.conf (dhcp config) file.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 2:39 am

/etc/dhcpd.conf

Code: Select all

# DCHP Configuration File: /etc/dhcpd.conf
 
# General Options
 
default-lease-time      21600;    # 6 hours
max-lease-time          21600;
use-host-decl-names     on;
ddns-update-style       none;     # 'none' is "required for ISC v3.0"
 
 
# Network Options
 
option subnet-mask          255.255.255.0;
option broadcast-address    192.168.1.255;      # What does this do?
option routers              192.168.1.1;        # Dlink router.
option domain-name-servers  192.168.1.100;      # This box
option domain-name          "davidhays.com";    # Is this required?
 
 
# Dynamically allocate IP addresses to everyone who asks
 
subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.20;
}
David

CharlieChan
Patron of SPCR
Posts: 198
Joined: Sun Jul 13, 2003 2:57 am
Location: East Anglia, UK

Post by CharlieChan » Fri Dec 19, 2003 2:54 am

David,

I guest the two machines that was able to connect to the internet has their IPs in the /etc/hosts file. PSC appears to have a dynamic IP assigned to it. Remember dnsmasq is not a proper dns server, it is a proxy server which first search the /etc/hosts for IP alias and if it is not there it passes the request to your ISP's dns server.

Doing a whois domain name search on www.davidhays.com reveals that a real www.davidhays.com exist at 216.21.229.209. You should rename your network to something else may be www.davidhays.biz.

What is in the /etc/resolv.conf and /etc/dhcpd.conf of the fahserv ?

Charlie.

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 3:58 am

Code: Select all

/etc/resolv.conf
nameserver 127.0.0.1

/etc/resolv.dnsmasq
search ks.ok.cox.net
nameserver 192.168.1.1
To force my domain name to be treated as a LOCAL domain name, and not passed to the "upstream server", I added the following line to dnsmasq.conf

Code: Select all

service=/davidhays.com/
I can now 'ping pcnut' and 'ping psc', which is progress, but I *STILL* don't have Internet access. Something is querying the name server for pcnut.davidhays.com and it's not resolving that:

Code: Select all

dnsmasq: query pcnut.davidhays.com from 127.0.0.1
dnsmasq: config pcnut.davidhays.com is <NODATA>-IPv4
dnsmasq: query pcnut from 127.0.0.1
dnsmasq: DHCP pcnut is 192.168.1.10
I'm close. I am very very close.

David

haysdb
Patron of SPCR
Posts: 2425
Joined: Fri Aug 29, 2003 11:09 pm
Location: Earth

Post by haysdb » Fri Dec 19, 2003 4:10 am

Well, I can now ping pcnut and I can ping pcnut.davidhays.com, and my Internet connection (on pcnut) STILL doesn't work. I suspect Windows has something cached locally so I am going to bring both machines down, restart the server (to make sure IT doesn't have anything cached either), then cross my fingers and restart the desktop machine.

Code: Select all

dnsmasq: query pcnut.davidhays.com from 127.0.0.1
dnsmasq: DHCP pcnut.davidhays.com is 192.168.1.10
I added the following line to /etc/dnsmasq.conf to get it to append davidhays.com onto the simple names in the dhcpd.leases file:

Code: Select all

# Enable this option to add the domain-suffix to simple names (without a
# period) in /etc/hosts in the same way as for DHCP-derived names.
 
expand-hosts
My comment is taken pretty much verbatim from the man file, but these names are not IN the /etc/hosts file, but rather in the dhcpd.leases file. I dunno. Either the doc is worded funny or it's working for some other reason than expand-hosts. :shrug:

David

Post Reply