Re: DHCP Server, dynamic & static address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 18:31 10/25/2003, you wrote:
I have a subnet, let's say 192.168.254.0/24 where the dhcp server is
192.168.254.1 and I want to give fixed ip addresses to the users in that
subnet, by MAC addr., but I also need that a couple of workstations remain
with the ip setup normally ( they don't need to get ips from dhcp, they
should use preconfigured ips already setup on those machines). I have a
squid server, a mail server and my computer that I don't want to depend on
dhcp.

The three must not mix but they can coexist without problems. What I do is:


* Machines with statically-configured IP addresses, who do not even talk to the DHCP server, are all between 1 and 50

* Machines which are assigned static addresses by the DHCP server are given IP addresses between 51 and 100

* The DHCP server dynamically assigns addresses between 101 and 254 to any other computer that requests an IP address

Question: what will be the behaviour of the dhcp server in this situation
and if necessary what option should I put in the config file for this
scenario to work?

My current dhcpd.conf :
ignore client-updates;
subnet 192.168.254.0 netmask 255.255.255.0 {
        option routers 192.168.254.1;
        option domain-name "lglink.ro";
        option domain-name-servers 192.168.254.1, 192.168.254.125;
        option broadcast-address 192.168.254.255;
        deny unknown-clients;
        default-lease-time 43200;
        max-lease-time 86400;
        # client1
        host gelu {
                hardware ethernet 00:02:44:70:0D:80;
                fixed-address 192.168.254.11;
                }
...and so on...

It looks to me like you do not have a range for dynamic allocations, although perhaps you did that deliberately if I understood you above. Here is a FULL copy of my /etc/dhcpd.conf for your reference, and note that I write comments for which machines have static (non-DHCP) addresses so I don't mistakenly assign the same address to anyone else:


# Global parameters

authoritative;

option          domain-name             "casa.paiz.org";
option          domain-name-servers     192.168.0.1;
option          routers                 192.168.0.1;

option          time-offset             -21600;
option          ntp-servers             192.168.0.1;

max-lease-time                          86400;
default-lease-time                      86400;

allow                                   unknown-clients;
deny                                    bootp;

ddns-update-style none;

# Subnet declarations

shared-network CASA.PAIZ.ORG {
        subnet 192.168.0.0 netmask 255.255.255.0 {
                range 192.168.0.101 192.168.0.254;
        }
}

group {
        use-host-decl-names             on;

# 1 achilles host static

# 50 wap11-arriba network static

#        51     adan                    host            dhcp
        host adan {
                hardware ethernet       00:50:ba:5d:6f:2c;
                fixed-address           192.168.0.51;
        }

<EOF>


-- Rodolfo J. Paiz rpaiz@xxxxxxxxxxxxxx


-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux