E
E
ESP2015-10-23 16:16:49
DHCP
ESP, 2015-10-23 16:16:49

What is the best way to configure a DHCP server with static addresses for LAN and WLAN connections?

I set up the distribution of ip-addresses in accordance with the MAC-addresses.
(Debian, isc-dhcp-server + bind and about 170 clients on the network)
Of course, MAC-and LAN and WLAN cards in client laptops are different.
However, so far it has been done like this:
The following construction is used in the DHCP server config
host c18m-04.lan { hardware ethernet 54:BE:F7:16:4B:FA; fixed-address c18m-04; }
host c18m-04.wifi { hardware ethernet 70:18:8B:B9:8B:1D; fixed-address c18m-04; }
That is, if you connect via wifi or lan, the address will be assigned to the one that is tied to c18m-04 in the dns-server (BIND).
With this scheme, it is convenient that addresses can only be changed in BIND'e, and in the dhcp config you can only leave a pointer to the domain name. But sometimes problems arise if the client, being automatically connected to wifi, clings to the network via a twisted pair cable, and as a result, it receives addresses from APIPA on the LAN port, because. ip-shnik is already reserved for wifi-connection (which can be weak). As a result, there is no network (it does not happen often, but I want to avoid such a development of events).
How would you break it down more elegantly?
While choosing from:

  1. Prescribe two host names in BIND? Then they will turn out to be overloaded (if you sculpt additional numbers from the tail. There will be confusion).
  2. In BIND'e to assign two ip-shniks to one host name? (Will the DHCP server understand this? It seems to me in the fixed-address c18m-04 directive; it will resolve the first address it comes across, say that it is busy, and then get APIPA again.
  3. In BIND, assign two ip-shniks to one host name. And in the DHCP config, instead of fixed-address c08m-04; write ip-shniks in accordance with the interface of laptops.

The last two options are somewhat annoying because the number of ip-addresses will increase and the subnet will simply not be enough. We'll have to dance with the division of the physical network into logical ones.
Or with masks. So that instead of the former 192.168.1.50 / 24 , two hosts are given:
192.168.0.50 / 23 - lan
192.168.1.50 / 23 - wan
And at the same time, the network does not need to be divided into two logical ones.
I myself lean more towards option 3 and changing the netmask. But suddenly there are better options.
What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oia, 2015-10-23
@oia

you can clarify why do statics with dhtsp, what's the point?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question