Koozali.org: home of the SME Server

DHCP - add custom entry

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
DHCP - add custom entry
« on: August 18, 2008, 02:58:03 PM »
Hi all
We have an existing SME 7.3 sever providing dhcp, which we don't want to mess with.
We are setting up a FOG imaging server on the same LAN.
The FOG install has this option (bolding is mine):
Quote
[...]
Would you like to use the FOG server for dhcp service? [Y/n]
DHCP will not be setup but you must setup your
current DHCP server
to use FOG for pxe services.

On a Linux DHCP server you must set:
next-server
[...]

I had a look at /etc/e-smith/templates/etc/dhcpd.conf  - all the files in there are code, not settings, thus I'm unsure as to how to make the above entry in templates/custom.
Could someone prompt me on how to do that (exactly, please)?
SME Server is a fantastic product - thank you!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: DHCP - add custom entry
« Reply #1 on: August 18, 2008, 07:30:41 PM »
Hi all
We have an existing SME 7.3 sever providing dhcp, which we don't want to mess with.
We are setting up a FOG imaging server on the same LAN.
The FOG install has this option (bolding is mine):
I had a look at /etc/e-smith/templates/etc/dhcpd.conf  - all the files in there are code, not settings, thus I'm unsure as to how to make the above entry in templates/custom.
Could someone prompt me on how to do that (exactly, please)?
I don't know what your exact question is but my guess is you need a hostname to resolve to the IP of your FOG server. If so you can do that by reserving a IP number using the MAC address in the server-manager under the Hostnames and addresses panel.

You do not necessarily need FOG as you can also serve images from your SME Server using this contrib: http://wiki.contribs.org/Tftp_server
« Last Edit: August 18, 2008, 07:32:50 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: DHCP - add custom entry
« Reply #2 on: August 19, 2008, 10:01:25 AM »
cactus
Quote
I don't know what your exact question is but my guess is you need a hostname to resolve to the IP of your FOG server. If so you can do that by reserving a IP number using the MAC address in the server-manager under the Hostnames and addresses panel.
Of course, why didn't I think of that.

Thanks for this pointer
Quote
You do not necessarily need FOG as you can also serve images from your SME Server using this contrive: http://wiki.contribs.org/Tftp_server
I'm looking through the threads on this - very interesting. This contrib promotes a one stop shop, which can be ideal.
I've not yet read how to provide a xp image to a pxe client, though. I assume this is feasible?
SME Server is a fantastic product - thank you!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: DHCP - add custom entry
« Reply #3 on: August 19, 2008, 12:00:34 PM »
cactusOf course, why didn't I think of that.

Thanks for this pointerI'm looking through the threads on this - very interesting. This contrib promotes a one stop shop, which can be ideal.
I've not yet read how to provide a xp image to a pxe client, though. I assume this is feasible?

I guess so there is a thinclient contrib to go with it.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: DHCP - add custom entry
« Reply #4 on: August 20, 2008, 09:41:47 AM »
Quote
I guess so there is a thinclient contrib to go with it.
It seems these contribs are for booting thin clients.

FOG will download an image to a pxe client, making it a free opensource Ghost replacement:
http://www.fogproject.org/wiki/index.php?title=FOGUserGuide#Background_on_FOG
I'm not punting FOG here, just looking for a bit of help in sorting out our DHCP environment.

We wish to keep the DHCP service as currently supplied by our SME server, so have disabled DHCP on the FOG server.
All I'm asking, please, is where (in templates-custom) a more experienced SME admin would place the following DHCP statement:
Quote
Code: [Select]
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
   next-server x.x.x.x;
   filename "pxelinux.0";
 };
Simply adding a host entry to SME's host panel is insufficient, I believe, although I've done that.
The FOG wiki indicates the above addition, but they aren't aware of SME's custom templating, so cannot assist me any further.
SME Server is a fantastic product - thank you!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: DHCP - add custom entry
« Reply #5 on: August 20, 2008, 10:32:08 AM »
The FOG wiki indicates the above addition, but they aren't aware of SME's custom templating, so cannot assist me any further.
Does the FOG wiki give you any pointers as to which configuration file to edit? Those templates together build the normal configuration files...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: DHCP - add custom entry
« Reply #6 on: August 20, 2008, 03:28:48 PM »
cactus, thanks for responding.
Quote
Does the FOG wiki give you any pointers as to which configuration file to edit?
All they say is the following:
Quote
Existing DHCP server
You must add the following lines to your existing DHCP server
I've hunted through the forum - there is no specific mention, but I would think they refer to the dhcpd.conf file? Of course all threads relate to "standard" Linux.
SME Server is a fantastic product - thank you!

Offline Confucius

  • *****
  • 235
  • +0/-0
Re: DHCP - add custom entry
« Reply #7 on: August 20, 2008, 03:54:59 PM »
From what I can make of the story is that the choice NO has the effect that FOG suggests it's running on a seperate server and therefore needs the line "next-server".
Any PXE request will be re-routed to the IP-address used with "next-server".
When you install FOG on the same server where you have the DHCP-service running you don't need to use "next-server".
The TFTP contrib is very suitable when you use FOG on the same server.

I hope this helps a little

Harro

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: DHCP - add custom entry
« Reply #8 on: August 20, 2008, 03:59:17 PM »
The FOG wiki indicates the above addition, but they aren't aware of SME's custom templating, so cannot assist me any further.

SME's templating is just an automated text editor. If you understand what you want to change in the output (the dhcpd.conf file) then working out what to replace or add to the templates shouldn't be hard.

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DHCP - add custom entry
« Reply #9 on: August 20, 2008, 07:11:38 PM »


Code: [Select]
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
   next-server x.x.x.x;
   filename "pxelinux.0";
 };

Paste that to /etc/dhcpd.conf at the end of the file.

Restart the dhcp service

service dhcpd restart

If all is working cut it out and create a template file

pxeclient

 in

/etc/e-smith/templates-custom/etc/dhcpd.conf

dhcpd.conf is a folder in /etc/e-smith/templates-custom/etc/

create the folder & create the template file pxeclient in that folder.

restart the dhcp service.

service dhcpd restart

HTH





« Last Edit: August 20, 2008, 10:35:35 PM by electroman00 »

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DHCP - add custom entry
« Reply #10 on: August 20, 2008, 08:40:03 PM »
.
« Last Edit: August 20, 2008, 09:12:34 PM by electroman00 »

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DHCP - add custom entry
« Reply #11 on: August 20, 2008, 09:20:08 PM »
FOG interesting

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DHCP - add custom entry
« Reply #12 on: August 20, 2008, 09:20:52 PM »
.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: DHCP - add custom entry
« Reply #13 on: August 20, 2008, 09:30:11 PM »
.« Last Edit: Today at 03:12:34 PM by electroman00 »

electroman, please do not try to alter history by removing what you have written in the past.

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DHCP - add custom entry
« Reply #14 on: August 20, 2008, 10:37:03 PM »
electroman, please do not try to alter history by removing what you have written in the past.

10-4