Two subnets, one with PXE clients
Simon Hobson
dhcp1 at thehobsons.co.uk
Sat Feb 20 20:48:51 UTC 2010
<osmany at oc.quimefa.cu> wrote:
>I would like some help in configuring my DHCP. Currently I am running
>ubuntu server 9.04 with dhcp3. I have successfully configured it with
>dynamic dns updates. Recently I had to install and configure an LTSP server
>but I would like to use the same DHCP to assign IP addresses to he PXE
>Clients but here is the thing; I would like to work with the PXE Clients on
>the same physical network but on a separate subnet. For example I would
>like the windows XP clients to work on the 10.25.4.0/24 subnet and the PXE
>Clients to work on the 192.168.0.0/24 subnet, of course I have a second NIC
>installed and configured.
From the way it's phrased, I assume both sets of clients are on the
same physical network ? Ie, a machine may boot into PXE and get one
address, then boot into Windows with the same network cable and get a
different address.
If this is the case, then you have a shared network and MUST
configure the server accordingly.
You do NOT need a separate network card for this, and in fact it will
complicate matters if you do. You can add multiple IP addresses to
one interface, use the "ip" command to do this, eg "ip addr add
192.168.0.1/24 dev eth0" will add 192.168.0.1 to whatever is already
configured on eth0. Ubuntu is Debian derived, so you can add this to
/etc/network/interfaces to have it done automatically :
auto eth0
iface eth0 inet static
address 10.25.4.1
netmask 255.255.255.0
up ip addr add 192.168.0.1/24 dev eth0
>I was thinking about it and I came up with some thing like this:
>
>authoritative;
>default-lease-time 600;
>max-lease-time 7200;
>log-facility local7;
>ddns-updates on;
>ddns-update-style interim;
>ignore client-updates;
>
>
>include "/etc/bind/rndc.key";
>
>zone domain.{
> primary 127.0.0.1;
> key rndc-key;
>}
>
>zone 4.25.10.in-addr.arpa.{
> primary 127.0.0.1;
> key rndc-key;
>}
>
>include "/etc/bind/rndc.key";
>
>zone domain.{
> primary 127.0.0.1;
> key rndc-key;
>}
>
>zone 4.25.10.in-addr.arpa.{
> primary 127.0.0.1;
> key rndc-key;
>}
>
>subnet 10.25.4.0 netmask 255.255.255.0 {
> option ntp-servers 10.25.4.6;
> option ip-forwarding off;
> option domain-name "oc.quimefa.cu";
> option domain-name-servers 10.25.4.8;
> ddns-domainname "domain.";
> ddns-rev-domainname "4.25.10.in-addr.arpa.";
> range 10.25.4.20 10.25.4.46;
> range 10.25.4.48 10.25.4.51;
> range 10.25.4.53 10.25.4.78;
> range 10.25.4.80 10.25.4.94;
> range 10.25.4.172 10.25.4.210;
> range 10.25.4.212 10.25.4.229;
> option routers 10.25.4.1;
> option broadcast-address 10.25.4.255;
> deny members of "PXEClients";
>}
>
>class "PXEClients" {
> match if substring (option vendor-class-identifier, 0, 3)="PXE";
> one-lease-per-client on;
> next-server 192.168.0.2;
> filename "/ltsp/pxelinux.0";
> option root-path "/opt/ltsp/i386";
> allow booting;
> allow bootp;
>}
>
>subnet 192.168.0.0 netmask 255.255.255.0 {
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.0.255;
> range 192.168.0.4 192.168.0.50;
> allow members of "PXEClients";
>}
Close. Assuming you do have a shared network, then you MUST configure
your subnets like this :
shared-network "any-old-name" {
subnet 10.25.4.0 netmask 255.255.255.0 {
...
deny members of "PXEClients";
}
subnet 192.168.0.0 netmask 255.255.255.0 {
...
allow members of "PXEClients";
}
}
Without the shared network declaration, when a PXE client attempts to
get an address, it will initially be offered one, but when it sends a
DHCP-Request for it, the server will send a DHCP Nack in response
because the address won't be valid for the 10.25.4.0 subnet.
Similarly, any requests by other clients will get a nack because the
address won't be valid for the 192.168.0.0 subnet.
--
Simon Hobson
WANTED: "Software CD ROM Kit" for Canon CLBP 360-PS printer (Canon
part no RH6-3612, or possibly RH6-3810, or RH6-3610 might do). I've a
dead HD and need this CD so I can replace the disk and re-install the
printer OS on it. If anyone knows where I might get hold of one I'd
be grateful - requests to Canon drew a blank, it's been out of
support for years.
Alternatively, if anyone has one of these and would let me image
their hard disk ...
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users
mailing list