Problem with multiple DHCP servers on a large network

Hi,

I’m trying to use OpenSuse on a large network where there are infortunately several DHCP servers. From what I have understood, DHCPCD seems to pick up the first server to reply to its broadcast request which is never the one I want to use. And so I get an incorrect network configuration.

I would like to whitelist the DHCP server I want to use or blacklist the other ones. Recent versions of DHCPCD allows to do so but the version used in OpenSuse is quite old and don’t provide the whitelist or blacklist options.

Is there another way?
Or is it possible to install a more recent version of DHCPCD?

Can anybody help, please?

On 11/22/2012 06:26 PM, sweinst wrote:
> Or is it possible to install a more recent version of DHCPCD?

what version or DHCPCD are you using?
what openSUSE version are you using?
might as well tell us what desktop environment you are using also…
is there a router between you and the networked DHCP servers?

we can’t guess these things… :wink:


dd

Apart from the fact that you indeed forgot to tell even which version of openSUSE you use, my idea is that this is a very strange network. What your system experiences, getting different results from different DHCP servers, must be experienced by all other systems in that LAN. What does the network manager (the person, ot the Linux tool) tell you about this?

On 2012-11-22 19:26, hcvv wrote:
>
> Apart from the fact that you indeed forgot to tell even which version of
> openSUSE you use, my idea is that this is a very strange network. What
> your system experiences, getting different results from different DHCP
> servers, must be experienced by all other systems in that LAN. What does
> the network manager (the person, ot the Linux tool) tell you about this?

Indeed, what does he say? He has the duty to isolate those multiple dhcp
servers…


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I’m using the latest OpenSuse 12.2. It comes with DHCPCD 3.2.3 (released in October 2008!). The latest version of DHCPCD is 5.5.6.

I’m using using KDE but I don’t think there is any relationship (I’ve the same problems when starting at level 3, e.g. without X11).

I’m using the “ifup” network management (I’ve also tried Network Manager). I’ve also tried to use dhclient instead of dhcpcd. But it’s still using the wrong server.

What is very strange is that I have also installed the CentOS 5 distribution and it found the right DHCP server straight away…

I know very little about the network configuration, and the network administrators are far from being helpful.

As I know which server to use, a very simple solution would be to whitelist the server I want to use. Is there a way of doing so with OpenSuse 12.2?

I think you have a bit a confused idea about what a DHCP does. It is not a normal client-server application in that it uses a well known port in the TCP/IP world. The client system at that moment in time has no IP address and non of the other configuration data needed for functioning in the TCP/IP world. It is connected to the LAN using ethernet and can only do a general broadcast. Like: “Help, does anybody listen?” No way to address a specific DHCP server. No black or white lists involved.

The only thing the DHCP server gets from the client is it’s MAC address (the ethernet address that should be unique world wide and thus must be uniquee on the LAN also). It then uses this address to send ethernet packages to the client. These packages can contain the IP address and more for the client to be used. After that the client is now a full fledged partner in TCP/IP and can use tha protocol stack to go to other inthe LAN and outside.

Can’t you use simply stop using DHCP and use a fixed IP address? Try to find out what the range of your IP (sub)net is and what the range of addresses given out by the DHCP server(s) is. Then use one inside the first and outside the seond. You can create havoc on your LAN by doing this, but maybe your network manager is more cooperative after you messed his LAN up because he didn’t give you the information asked for.

EDIT: Oh yes, and another OS finding what is in your experiencee the “right” DHCP server is a very human centered statement. You better find out what makes this so called “right” server technicaly (and not because you love it) different from all the others.

I know little about the DHCP protocol but I’m sure that it’s possible for the DHCP client to refuse a lease offer based on a server IP address. When the client receives the lease offer it does get the server address (field SIADDR of the server offer: Dynamic Host Configuration Protocol - Wikipedia, the free encyclopedia).

Now, if you look at a recent manpage of dhpcd, (for example: Ubuntu Manpage: dhcpcd.conf – dhcpcd configuration file), you can see the options:

blacklist address[/cidr] Ignores all packets from address[/cidr].
whitelist address[/cidr] Only accept packets from address[/cidr]. blacklist is ignored if whitelist is set.

which I think is exactly what I’m looking for

At one time, I was on a network with two DHCP servers. I managed one of those.

Both servers had a list of MAC addresses to which they would respond. This seemed to work fine. I think sometime the wrong server would respond with a NAK, such as when a client was requesting an IP inappropriate for the network. That never caused a problem. Each client received its configuration from the appropriate server.

Once our campus switched to providing service to systems without a previously registered MAC address, we merged the small number of fixed IP assignments from the tables of both servers, and then shutdown one of the DHCP servers.

On 2012-11-22 21:26, sweinst wrote:

> I’m using the “ifup” network management (I’ve also tried Network
> Manager). I’ve also tried to use dhclient instead of dhcpcd. But it’s
> still using the wrong server.
>
> What is very strange is that I have also installed the CentOS 5
> distribution and it found the right DHCP server straight away…

There are two different dhcp clients, try the “other”, whichever that
is. There is a sysconfig variable to select which, if installed.

Ah, I see you tried… bad luck, then. Use fixed IPs then. Or work for a
serious company that knows how to do things like networking.

> I know very little about the network configuration, and the network
> administrators are far from being helpful.

They should be fired. Seriously.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On 2012-11-22 23:46, sweinst wrote:
> Now, if you look at a recent manpage of dhpcd, (for example: ‘Ubuntu
> Manpage: dhcpcd.conf – dhcpcd configuration file’
> (http://manpages.ubuntu.com/manpages/precise/man5/dhcpcd.conf.5.html)),
> you can see the options:

Well, then use the openSUSE software search page to find if somebody is
packaging that version. If not, perhaps you can convince somebody to do
it, or you will have to download the sources yourself and build it.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

That indeed seems to be a different dhcpd implementation as on openSUSE the man page never even mentions a dhcpd.conf file.

Does this btw explain why CentOS does use the “correct” one without you doing anything to tell it which one is the “correct” one?

On 11/23/2012 02:54 AM, Carlos E. R. wrote:

> have to download the sources yourself and build it

+1


dd

On 2012-11-23 11:16, hcvv wrote:
> Does this btw explain why CentOS does use the “correct” one without you
> doing anything to tell it which one is the “correct” one?

Different client doing different choices, or different network timing…


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On 2012-11-23 11:18, dd wrote:
> On 11/23/2012 02:54 AM, Carlos E. R. wrote:
>
>> have to download the sources yourself and build it
>
> +1

I prefer the firing squad here :-p

(so that competent people get a job instead)


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Thanks a lot for your very helpful comments, Carlos.

sweinst wrote:
> I’m using the latest OpenSuse 12.2. It comes with DHCPCD 3.2.3
> (released in October 2008!). The latest version of DHCPCD is 5.5.6.
>
> I’m using using KDE but I don’t think there is any relationship (I’ve
> the same problems when starting at level 3, e.g. without X11).
>
> I’m using the “ifup” network management (I’ve also tried Network
> Manager). I’ve also tried to use dhclient instead of dhcpcd. But it’s
> still using the wrong server.
>
> What is very strange is that I have also installed the CentOS 5
> distribution and it found the right DHCP server straight away…

Carlos E. R. wrote:
> There are two different dhcp clients, try the “other”, whichever that
> is. There is a sysconfig variable to select which, if installed.
>
> Ah, I see you tried… bad luck, then.

The OP says he tried ‘dhclient’ but
http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/cha.dhcp.html#sec.dhcp.soft
says the ISC client is called dhcp-client. So is that a typo by the OP,
or a third client? In any event it seems that the OP should use
dhcp-client and if it does not work immediately, then post the .conf
file so people here can check it.

The man pages for dhclient mention “dhclient.conf” and the man pages for “dhclient.conf” mention a “reject” statement to reject offers from servers that you don’t want to see.

On 2012-11-23 11:46, sweinst wrote:

> Thanks a lot for your very helpful comments, Carlos.

Welcome :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I may have been a little ironic :slight_smile:

Serge

On 2012-11-23 14:06, sweinst wrote:
>
> robin_listas;2505929 Wrote:
>> On 2012-11-23 11:46, sweinst wrote:
>>
>>> Thanks a lot for your very helpful comments, Carlos.
>>
>> Welcome :slight_smile:

> I may have been a little ironic :slight_smile:

Me too.

But my advices were totally serious and I stand by them.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))