DHCP and router configuration

Preston Hagar prestonh at gmail.com
Wed Apr 21 16:13:12 UTC 2010


On Wed, Apr 21, 2010 at 12:15 AM, Dotan Cohen <dotancohen at gmail.com> wrote:
> Ubuntu Server 9.10 or 9.04, no GUI.
>
> If the router (wired consumer Linksys model) is configured to always
> serve a specific address to the server, does DHCP have to be disabled
> on the server? If not, will disabling DCHP cause any harm?
>
> --
> Dotan Cohen
>
> http://bido.com
> http://what-is-what.com
>
> --

How is the Linksys configured to serve a specific address to the
server?  Is it by static DHCP using the MAC address (this is the most
common way and really the only way I know to do it on a Linksys)?   If
so, then you will need to keep the dhcp client running on your Linux
server so that it can continue to get the address.  It is still using
DHCP, you have just hard coded in the IP that specific MAC address
should always get.

Generally, when you want a machine to always have a specific IP
address, you have two options, put the address in
/etc/network/interfaces like this:

# The primary network interface
auto eth2
iface eth2 inet static
      address 10.1.1.6
      netmask 255.255.0.0
      gateway 10.1.254.254

Or leave your interface on DHCP and configure your DHCP server to
always had out a specific address to the MAC address of the network
interface on the machine.

Just to clarify, if a DHCP server is running on your Linksys box, you
do _not_ want a DHCP server to run on your Linux box.  Generally you
only want one DHCP server on the network, otherwise they could start
"fighting it out" and hand out duplicate addresses.

Hope this helps,

Preston




More information about the ubuntu-users mailing list