Bind DHCP to a specific ip

Glenn Satchell Glenn.Satchell at uniq.com.au
Sun Jan 3 09:23:16 UTC 2010


>X-Authority-Analysis: v=1.0 c=1 a=jHAYGM0HDQgA:10 a=FKkrIqjQGGEA:10 
a=b49MmcjL-ffBMbgRw_kA:9 a=3KZzlkwfwCYfrRnx_DCuPAPjkVoA:4
>X-Cloudmark-Score: 0
>X-Virus-Scanned: amavisd-new at mail.electrichendrix.com
>Date: Sat, 2 Jan 2010 21:47:35 -0500 (EST)
>From: Chris Arnold <carnold at electrichendrix.com>
>To: Users of ISC DHCP <dhcp-users at lists.isc.org>
>Subject: Re: Bind DHCP to a specific ip
>X-BeenThere: dhcp-users at lists.isc.org
>
>On Sat, Jan 2, 2010 at 9:13 PM, Chris Arnold
><carnold> wrote:
>> Happy new year to you all!
>> We are at a spot where we may need to bind dhcp to a specific
>> ip/interface on the dhcp server. When running netstat -nlp, dhcp shows
>> 0.0.0.0:67, which i believe means dhcp is listening on all ip addresses
>> on the dhcp server. This server is SLES10 SP3 and has 2 nic's. Is it
>> possible to bind dhcp to a specific ip/interface on the dhcp server?
>>
>>Search the man page for "local-address" and "server-identifier."
>
>The man dhcpd does not contain those phrases/words. The man i am
>looking at is dhcpd(8)

Those words are for when you have multiple IPs on one interface.

>> *EDIT
>> man dhcpd says "the names of the network interfaces on which dhcp
>> should listen for broadcasts may be specified on the command line" but
>> i do not see anywhere in that man where it says what the syntax should
>> be, i.e dhcpd eth0....
>>
>> Can anyone clarify?

% man dhcpd

NAME
     dhcpd - Dynamic Host Configuration Protocol Server

SYNOPSIS
     dhcpd [ -p port ] [ -f ] [ -d ] [ -q ] [ -t | -T ] [ -4 | -6
     ] [ -s server ] [ -cf config-file ] [ -lf lease-file ] [ -pf
     pid-file  ]  [  -tf  trace-output-file  ]  [  -play   trace-
     playback-file ] [ if0 [ ...ifN ] ]
                     ^^^^^^^^^^^^^^^^^^

COMMAND LINE
     The names of the network interfaces on  which  dhcpd  should
     listen  for broadcasts may be specified on the command line.

In the synopsis above the interface names are represented by if0 [ ... ifN ]
There is no flag, and you can list more than one if required.

Use ifconfig -a to find out the names of your NICs, then specify the
one you want to use on the command line, eg, for Solaris (but Linux
will be similar):

% uname -a
SunOS grinder 5.10 Generic_142900-01 sun4u sparc SUNW,Ultra-5_10

% ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 
1
        inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.14.1 netmask ffffff00 broadcast 192.168.14.255
hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.20.99.252 netmask ffffff00 broadcast 10.20.99.255

# dhcpd hme1

Depending on your Linux distro there may be some specific config file
to put these command line options in. The startup scripts are not part
of the dhcpd distribution, and are usually customised by the distro
maintainers.

regards,
-glenn





More information about the dhcp-users mailing list