FAQ
Hello listmates,

I am running DHCPD for IPv4 on a Centos 5 machine. I am wondering if anyone
has got a functional dhcpd.conf configuration serving static routes to
Linux, Mac OS X and Windows clients.

I tried a couple of variations of static-routes options - but have yet to
create something that would work.

Thanks.

Boris.

Search Discussions

  • Rob Kampen at Jun 11, 2012 at 5:51 pm

    On 06/12/2012 09:14 AM, Boris Epstein wrote:
    Hello listmates,

    I am running DHCPD for IPv4 on a Centos 5 machine. I am wondering if anyone
    has got a functional dhcpd.conf configuration serving static routes to
    Linux, Mac OS X and Windows clients.

    I tried a couple of variations of static-routes options - but have yet to
    create something that would work.
    Use this:
    ddns-domainname "mydomainname.com";
    ddns-update-style interim;
    ddns-rev-domainname "in-addr.arpa";
    ddns-updates on;
    ignore client-updates;

    key DHCP_UPDATER {
    algorithm hmac-md5;
    secret xxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    };

    zone mydomainname.com. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    zone 1.168.192.in-addr.arpa. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    subnet 192.168.1.0 netmask 255.255.255.0 {
    authoritative;
    # --- default gateway
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    option nis-domain "mydomainname.com";
    option domain-name "mydomainname.com";
    option domain-name-servers 192.168.1.1 , 192.168.1.2 ;
    option time-offset -18000;
    option ntp-servers 192.168.1.2;
    option netbios-name-servers 192.168.1.10;
    range dynamic-bootp 192.168.1.64 192.168.1.127;
    default-lease-time 21600;
    max-lease-time 43200;
    }
    # we want the nameserver to appear at a fixed address
    host iPhone {
    next-server iPhone.mydomainname.com;
    hardware ethernet 00:24:36:49:42:81;
    fixed-address 192.168.1.192;
    }
    host Australia {
    next-server australia.mydomainname.com;
    hardware ethernet 00:24:8c:81:0c:15;
    fixed-address 192.168.1.202;
    }
    host D610 {
    next-server D610.mydomainname.com;
    hardware ethernet 00:90:4b:c7:54:fb;
    fixed-address 192.168.1.201;
    }

    Hope this helps

    Thanks.

    Boris.
    _______________________________________________
    CentOS mailing list
    CentOS at centos.org
    http://lists.centos.org/mailman/listinfo/centos
  • Boris Epstein at Jun 11, 2012 at 6:05 pm

    On Mon, Jun 11, 2012 at 5:51 PM, Rob Kampen wrote:
    On 06/12/2012 09:14 AM, Boris Epstein wrote:

    Hello listmates,

    I am running DHCPD for IPv4 on a Centos 5 machine. I am wondering if
    anyone
    has got a functional dhcpd.conf configuration serving static routes to
    Linux, Mac OS X and Windows clients.

    I tried a couple of variations of static-routes options - but have yet to
    create something that would work.
    Use this:
    ddns-domainname "mydomainname.com";
    ddns-update-style interim;
    ddns-rev-domainname "in-addr.arpa";
    ddns-updates on;
    ignore client-updates;

    key DHCP_UPDATER {
    algorithm hmac-md5;
    secret xxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    };

    zone mydomainname.com. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    zone 1.168.192.in-addr.arpa. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    subnet 192.168.1.0 netmask 255.255.255.0 {
    authoritative;
    # --- default gateway
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    option nis-domain "mydomainname.com";
    option domain-name "mydomainname.com";
    option domain-name-servers 192.168.1.1 , 192.168.1.2 ;
    option time-offset -18000;
    option ntp-servers 192.168.1.2;
    option netbios-name-servers 192.168.1.10;
    range dynamic-bootp 192.168.1.64 192.168.1.127;
    default-lease-time 21600;
    max-lease-time 43200;
    }
    # we want the nameserver to appear at a fixed address
    host iPhone {
    next-server iPhone.mydomainname.com;
    hardware ethernet 00:24:36:49:42:81;
    fixed-address 192.168.1.192;
    }
    host Australia {
    next-server australia.mydomainname.com;
    hardware ethernet 00:24:8c:81:0c:15;
    fixed-address 192.168.1.202;
    }
    host D610 {
    next-server D610.mydomainname.com;
    hardware ethernet 00:90:4b:c7:54:fb;
    fixed-address 192.168.1.201;
    }

    Hope this helps

    Rob,

    Thanks, looks good. But what part of it deals with static routes for
    particular networks? All I see is one default gateway:

    option routers 192.168.1.1;

    Boris.
  • SVM at Jun 11, 2012 at 6:22 pm

    12.06.2012 02:05, Boris Epstein wrote:
    Thanks, looks good. But what part of it deals with static routes for
    particular networks? All I see is one default gateway:

    option routers 192.168.1.1;
    You should use dhcp options 121 (rfc3442) and 249 (MS).
    Here is example:
    http://thomasjaehnel.com/blog/2010/01/pushing-routes-via-dhcp.html

    See "man 5 dhcp-options" also.
  • Rob Kampen at Jun 11, 2012 at 6:32 pm

    On 06/12/2012 10:05 AM, Boris Epstein wrote:
    On Mon, Jun 11, 2012 at 5:51 PM, Rob Kampenwrote:
    On 06/12/2012 09:14 AM, Boris Epstein wrote:

    Hello listmates,

    I am running DHCPD for IPv4 on a Centos 5 machine. I am wondering if
    anyone
    has got a functional dhcpd.conf configuration serving static routes to
    Linux, Mac OS X and Windows clients.

    I tried a couple of variations of static-routes options - but have yet to
    create something that would work.
    Use this:
    ddns-domainname "mydomainname.com";
    ddns-update-style interim;
    ddns-rev-domainname "in-addr.arpa";
    ddns-updates on;
    ignore client-updates;

    key DHCP_UPDATER {
    algorithm hmac-md5;
    secret xxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    };

    zone mydomainname.com. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    zone 1.168.192.in-addr.arpa. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    subnet 192.168.1.0 netmask 255.255.255.0 {
    authoritative;
    # --- default gateway
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    option nis-domain "mydomainname.com";
    option domain-name "mydomainname.com";
    option domain-name-servers 192.168.1.1 , 192.168.1.2 ;
    option time-offset -18000;
    option ntp-servers 192.168.1.2;
    option netbios-name-servers 192.168.1.10;
    range dynamic-bootp 192.168.1.64 192.168.1.127;
    default-lease-time 21600;
    max-lease-time 43200;
    }
    # we want the nameserver to appear at a fixed address
    host iPhone {
    next-server iPhone.mydomainname.com;
    hardware ethernet 00:24:36:49:42:81;
    fixed-address 192.168.1.192;
    }
    host Australia {
    next-server australia.mydomainname.com;
    hardware ethernet 00:24:8c:81:0c:15;
    fixed-address 192.168.1.202;
    }
    host D610 {
    next-server D610.mydomainname.com;
    hardware ethernet 00:90:4b:c7:54:fb;
    fixed-address 192.168.1.201;
    }

    Hope this helps

    Rob,

    Thanks, looks good. But what part of it deals with static routes for
    particular networks? All I see is one default gateway:

    option routers 192.168.1.1;
    The subnet ip4address/mask {.......} defines the information that is
    available to the clients for that subnet.
    The host clientname { .....} defines the static ip address and name to
    be used for a given ethernet.
    Boris.
    _______________________________________________
    CentOS mailing list
    CentOS at centos.org
    http://lists.centos.org/mailman/listinfo/centos
  • Boris Epstein at Jun 11, 2012 at 6:35 pm

    On Mon, Jun 11, 2012 at 6:32 PM, Rob Kampen wrote:
    On 06/12/2012 10:05 AM, Boris Epstein wrote:

    On Mon, Jun 11, 2012 at 5:51 PM, Rob Kampen<rkampen at kampensonline.**com<rkampen@kampensonline.com>
    wrote:
    On 06/12/2012 09:14 AM, Boris Epstein wrote:

    Hello listmates,
    I am running DHCPD for IPv4 on a Centos 5 machine. I am wondering if
    anyone
    has got a functional dhcpd.conf configuration serving static routes to
    Linux, Mac OS X and Windows clients.

    I tried a couple of variations of static-routes options - but have yet
    to
    create something that would work.

    Use this:
    ddns-domainname "mydomainname.com";
    ddns-update-style interim;
    ddns-rev-domainname "in-addr.arpa";
    ddns-updates on;
    ignore client-updates;

    key DHCP_UPDATER {
    algorithm hmac-md5;
    secret xxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    };

    zone mydomainname.com. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    zone 1.168.192.in-addr.arpa. {
    primary 192.168.1.10;
    key DHCP_UPDATER;
    }

    subnet 192.168.1.0 netmask 255.255.255.0 {
    authoritative;
    # --- default gateway
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    option nis-domain "mydomainname.com";
    option domain-name "mydomainname.com";
    option domain-name-servers 192.168.1.1 , 192.168.1.2 ;
    option time-offset -18000;
    option ntp-servers 192.168.1.2;
    option netbios-name-servers 192.168.1.10;
    range dynamic-bootp 192.168.1.64 192.168.1.127;
    default-lease-time 21600;
    max-lease-time 43200;
    }
    # we want the nameserver to appear at a fixed address
    host iPhone {
    next-server iPhone.mydomainname.com;
    hardware ethernet 00:24:36:49:42:81;
    fixed-address 192.168.1.192;
    }
    host Australia {
    next-server australia.mydomainname.com;
    hardware ethernet 00:24:8c:81:0c:15;
    fixed-address 192.168.1.202;
    }
    host D610 {
    next-server D610.mydomainname.com;
    hardware ethernet 00:90:4b:c7:54:fb;
    fixed-address 192.168.1.201;
    }

    Hope this helps



    Rob,
    Thanks, looks good. But what part of it deals with static routes for
    particular networks? All I see is one default gateway:

    option routers 192.168.1.1;
    The subnet ip4address/mask {.......} defines the information that is
    available to the clients for that subnet.
    The host clientname { .....} defines the static ip address and name to be
    used for a given ethernet.
    Rob,

    You may be confusing two different things: static IP addresses for
    individual hosts and static routes to route IP traffic to certain subnets.

    Thanks anyways.

    Boris.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedJun 11, '12 at 5:14p
activeJun 11, '12 at 6:35p
posts6
users4
websitecentos.org
irc#centos

People

Translate

site design / logo © 2021 Grokbase