Multi-subnet DHCP

Jeff Anderson jefferya at programmerq.net
Sat Aug 23 18:25:27 UTC 2008


Hello!

Simon Hobson wrote:
> Jeff Anderson wrote:
>
>>
>> If an example or clarification is needed, let me know.
>
> Yes, the server WILL do that, and it's standard functionality. If it 
> isn't working then you've probably made a mistake in your config.
>
> Post your config, and a better explanation of your network topology 
> and we can take a look.
>

I've trimmed the config down (it is rather large and I didn't feel 
comfortable publishing our mac addresses). I've pasted it below.

Basically we're a CS department. We have a core switch, and we do vlans 
to separate things out-- linux lab machines have a vlan, windows 
another, etc... Research labs also get their own vlan and corresponding 
subnet. The core switch has each vlan configured to do "ip helper" to 
forward along the DHCP requests to the subnet that our dhcp server lives 
on. We have multiple subnets defined that have dynamic ranges in them. 
The DHCP server seems to assign appropriate dynamic addresses for each 
of these subnets that have the dynamic ranges defined.

I'm not sure if we've had a problem with addresses getting assigned 
wrong between subnets. I believe that it might have happened. I'll have 
to check with my co-workers to know for sure. I'm fairly certain that it 
has come up, but I don't know what they did to remedy the issue.

The best solution that I've come up with involves turning off the cisco 
"ip address helper" for the vlans that need dynamic ranges, and just run 
a dhcp server on our core switch for that vlan.

Thanks!


Jeff Anderson

ddns-update-style none;

allow booting;
allow bootp;
use-host-decl-names on;

#mac stuff
option mac-version code 230 = string;

shared-network example-Department
{
   option domain-name "example.com";
   option domain-name-servers 4.2.2.2
   get-lease-hostnames on;
   use-lease-addr-for-default-route on;
   option subnet-mask 255.255.255.0;
   log-facility local6;

   subnet 192.168.0.0 netmask 255.255.255.0
   {
      option routers 192.168.0.1;
      authoritative;
   }
   subnet 192.168.1.0 netmask 255.255.255.0
   {
      option routers 192.168.1.1;
      authoritative;
   }
   subnet 192.168.2.0 netmask 255.255.255.0
   {
      option routers 192.168.2.1;
      authoritative;
   }
   subnet 192.168.3.0 netmask 255.255.255.0
   {
      option routers 192.168.3.1;
      authoritative;
   }
   subnet 192.168.9.0 netmask 255.255.255.0
   {
      option routers 192.168.9.1;
      range 192.168.9.201 192.168.9.239;
      default-lease-time 172800;
      max-lease-time 172800;
      authoritative;
   }
   subnet 192.168.10.0 netmask 255.255.255.0
   {
      option routers 192.168.10.1;
      authoritative;
   }
   subnet 192.168.11.0 netmask 255.255.255.0
   {
      authoritative;
      option routers 192.168.11.1;
   }
   subnet 192.168.12.0 netmask 255.255.255.0
   { 
      option routers 192.168.12.1;
      authoritative;
   }
   subnet 192.168.13.0 netmask 255.255.255.0
   {
      option routers 192.168.13.1;
      authoritative;
   }
   subnet 192.168.14.0 netmask 255.255.255.0
   {
      option routers 192.168.14.1;
      authoritative;
   }
   subnet 192.168.15.0 netmask 255.255.255.0
   {
      option routers 192.168.15.1;
      authoritative;
   }
   subnet 192.168.16.0 netmask 255.255.255.0
   {
      option routers 192.168.16.1;
      authoritative;
   }
   subnet 192.168.17.0 netmask 255.255.255.0
   {
      option routers 192.168.17.1;
      range 192.168.17.200 192.168.17.250;
      default-lease-time 172800; # 2 days of seconds
      authoritative;
   }
   subnet 192.168.18.0 netmask 255.255.255.0
   {
      option routers 192.168.18.1;
      authoritative;
   }
   subnet 192.168.19.0 netmask 255.255.255.0
   {
      option routers 192.168.19.1;
      authoritative;
   }
   subnet 192.168.20.0 netmask 255.255.255.0
   {
      option routers 192.168.20.1;
      authoritative;
   }
   subnet 192.168.21.0 netmask 255.255.255.0
   {
      option routers 192.168.21.1;
      authoritative;
   }
   subnet 192.168.22.0 netmask 255.255.255.0
   {
      option routers 192.168.22.1;
      range 192.168.22.200 192.168.22.254;
      default-lease-time 172800; # 2 days of seconds
      authoritative;
   }
   subnet 192.168.23.0 netmask 255.255.255.0
   {
      option routers 192.168.23.1;
      range 192.168.23.200 192.168.23.254;
      default-lease-time 172800; # 2 days of seconds
      authoritative;
   }
   subnet 192.168.24.0 netmask 255.255.255.0
   {
      option routers 192.168.24.1;
      authoritative;
   }
   subnet 192.168.25.0 netmask 255.255.255.0
   {
      option routers 192.168.25.1;
      authoritative;
   }
   subnet 192.168.26.0 netmask 255.255.255.0
   {
      option routers 192.168.26.1;
      authoritative;
   }
   subnet 192.168.27.0 netmask 255.255.255.0
   {
      option routers 192.168.27.1;
      authoritative;
   }
   subnet 192.168.28.0 netmask 255.255.255.0
   {
      option routers 192.168.28.1;
      authoritative;
   }
   subnet 192.168.29.0 netmask 255.255.255.0
   {
      option routers 192.168.29.1;
      authoritative;
   }
   subnet 192.168.30.0 netmask 255.255.255.0
   {
      option routers 192.168.30.1;
      authoritative;
   }
   subnet 192.168.31.0 netmask 255.255.255.0
   {
      option routers 192.168.31.1;
      authoritative;
   }
   subnet 192.168.168.0 netmask 255.255.255.0
   {
      option routers 192.168.168.1;
      authoritative;
   }
   subnet 192.168.173.0 netmask 255.255.255.0
   {
      option routers 192.168.173.1;
      range 192.168.173.152 192.168.173.199;
      default-lease-time 172800; # 2 days of seconds
      authoritative;
   }
}

#We have separate groups defined to divide hosts logically-- not because 
they necessarily need different options.
group
{
   use-host-decl-names on;
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   next-server 128.187.80.42;
   filename "gx270_kickstart_f8/pxelinux.bin";
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   next-server 128.187.80.42;
   filename "fedora9_kickstart/pxelinux.bin";
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   next-server 128.187.80.42;
   filename "fedora9_kickstart/pxelinux.bin";
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   allow bootp;
   next-server 128.187.80.43; # mir
   filename "pxelinux.0";
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group
{
   use-host-decl-names on;
   default-lease-time 172800; # 2 days of seconds
   next-server 128.187.80.42; # hubble
   filename "fedora9_kickstart/pxelinux.bin";
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
}

group UML
{
   use-host-decl-names on;
   option routers 192.168.31.1;
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
   use-lease-addr-for-default-route on;
   option subnet-mask 255.255.255.0;
   default-lease-time 10800;
   max-lease-time 21600;
}

group cs462
{
   use-host-decl-names on;
   option routers 192.168.31.1;
   allow bootp;
   next-server 128.187.80.42; # hubble
   filename "gx270/pxelinux.bin";
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
   use-lease-addr-for-default-route on;
   option subnet-mask 255.255.255.0;
   default-lease-time 10800;
   max-lease-time 21600;
}

group labprinters
{
   #snip -- lots of hosts defined by fixed-address and hardware ethernet
   use-lease-addr-for-default-route on;
   option subnet-mask 255.255.255.0;
   default-lease-time 10800;
   max-lease-time 21600;
}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20080823/f2d7ad4e/attachment.bin>


More information about the dhcp-users mailing list