Default Gateway via DHCP

Daniel L. Miller dmiller at amfes.com
Thu Aug 7 20:16:00 UTC 2008


Below is an excerpt from my dhcpd.conf for version 3.  Nearly everything 
is working correctly, but I've noticed the default gateway is not being 
set correctly on my clients.  The gateway SHOULD be 192.168.0.72, but 
the clients are showing 192.168.0.1.  I'm defining the "option routers" 
at pool and group levels - I don't know why.

server-identifier bubba.amfeslan.local;
log-facility local1;
ddns-update-style none;
option wpad code 252 = text;
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
default-lease-time 600;
max-lease-time 7200;
class "openvpn" {
    match if substring (hardware, 1, 2) = 00:FF;
}
class "pxeclients" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    option vendor-class-identifier "PXEClient";
    vendor-option-space PXE;
    option PXE.mtftp-ip 0.0.0.0;
    filename "isolinux.bin";
    next-server 192.168.0.72;
}

# Primary AMFESLAN.LOCAL subnet
subnet 192.168.0.0 netmask 255.255.255.0 {
        authoritative;
        allow booting;
        allow bootp;
        allow client-updates;
        option nis-domain "amfeslan.local";
        option netbios-node-type 8;
        option netbios-scope "";
        option netbios-name-servers 192.168.0.72;
        option ntp-servers 192.168.0.72;
        option time-servers 192.168.0.72;
        option domain-name-servers 192.168.0.73, 192.168.0.1;
        option domain-name "amfeslan.local";
        option broadcast-address 192.168.0.255;
        option subnet-mask 255.255.255.0;
        pool {
                allow members of "openvpn";
                range 192.168.0.90 192.168.0.99;
        }
        pool {
                deny members of "openvpn";
                range 192.168.0.10 192.168.0.29;
                option routers 192.168.0.72;
                option wpad = "http://wpad.amfeslan.local/proxyconfig.pac";
        }

        # statically defined amfeslan.local hosts
        group {
                option routers 192.168.0.72;
                option wpad = "http://wpad.amfeslan.local/proxyconfig.pac";
                host accounting-1 {
                        hardware ethernet 00:19:21:0D:29:7F;
                        fixed-address 192.168.0.57;
                        option host-name "accounting-1";
                }
             [...whole bunch of static hosts...]
        }

        # Switches
        group {
                option routers 192.168.0.72;
                # Linksys SRW-224 Switch
                host SRW224 {
                        hardware ethernet 00:12:17:52:F8:9A;
                        fixed-address 192.168.0.254;
                }
        }

        # Printers
        group {
                option routers 192.168.0.72;
                host xerox {
                        hardware ethernet 00:00:aa:93:04:d5;
                        fixed-address 192.168.0.46;
                        option host-name "xerox";
                }
                host hp1055cm {
                        hardware ethernet 00:60:b0:e6:51:39;
                        fixed-address 192.168.0.45;
                        option host-name "hp1055cm";
                }
        }
}

-- 
Daniel


More information about the dhcp-users mailing list