DHCP install

Rick Stevens rstevens at vitalstream.com
Thu Feb 19 18:19:10 UTC 2004


Thomas Dodd wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> 
> Rick Stevens wrote:
> | <reformatted for bottom posting>
> |
> | Omar Zamora wrote:
> 
> |> I want to have DHCP on eth0.  And need help creating a dhcpd.conf
> |> file and the lease file.  My static IP address is 10.64.1.10
> 
> DHCP is a 2 part system.
> 
> One machine is the DHCP server. That's where you make changed to 
> dhcpd.conf.
> 
> The other machine(s) are clients. They request information for the
> server. The server gives it an IP address bassed on the servers
> configuration. That's the lease.
> 
> The server and the client remember this information for a predefined
> time, configured at the server. When the lease expires, the client
> requests a new one. The server won't give another client that address
> untill the lease expires.
> 
> Client configuration is easy. Just use redhat-config-network to use DHCP
> on that interface. Server is another story. There are lots of options to
> deal with, and it varies from server to server.
> 
> | DHCP and fixed IPs are mutually exclusive.  You can have a fixed IP or
> | get one from a DHCP server--you can't have both on the same interface.
> 
> That's incorrect. The DHCP server can be configured to always give a
> particular machine the same IP address. Quite handy in fact.
> 
>     -Thomas

No, Thomas.  You can't have a static IP on an interface AND have a DHCP
IP on the SAME interface.  You get one or the other, not both.  If the
/etc/sysconfig/network-scripts/ifcfg-ethX file says "BOOTPROTO=static",
you get a static IP.  If it says "BOOTPROTO=dhcp", it's DHCP.  You can't
have both.

Even if you have DHCP assign you the same IP every time, it's still a
DHCP-supplied IP, not a static IP despite the fact it's the same IP over
and over again.  "Static IP" in network parlance does not mean "it never
changes", it means "it's hard-configured".

<IMHO>
And I don't agree that it's particularly handy.  Unless you're doing
some very weird gateway, netmask or DNS change periodically and want to
pass that along via DHCP, getting the same IP and other network data via
DHCP is a waste of time and bandwidth.

If you get the same IP each time, just set it up as static.  Simply edit
/etc/sysconfig/network-scripts/ifcfg-ethX once to set the IP and
netmask, modify /etc/resolv.conf once to set the DNS resolvers and edit
/etc/sysconfig/network once to set the hostname and gateway and you're
done with it.
</IHMO>
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
- Linux is like a wigwam...no windows, no gates...and apache inside! -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list