Hello.

Such a problem: there are 3 routers on Linux: enter image description here

The first one is running a DHCP server, the second Main GW is the main gateway, the forwarding is working, and the third is the CLI GW, the DHCP Relay is running on it. Clients connected to CLI-GW should receive addresses from the pool in the first router, but for some reason receiving does not occur. Configs are attached.

dhcpd.conf: https://pastebin.com/5RPPw4T1

isc-dhcp-server:

INTERFACES = "eth0 eth1"

Relay is started with the command: dhcrelay -a -i ens4 -i eth0 -d 172.16.50.2.

(where ens4 is an interface looking at CLI-GW clients, eth0 is a DHCP server).

On Main-GW I tried to do masquerading between interfaces:

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE;

iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE.

The packet on the eth0 interface of the DHCP server is caught, option 82 is present, but with only one sub-option - Circuit-ID = ens4. How to connect Remote-ID - I have no idea.

In general, I do not know where to dig. There is an idea to rebuild the isc-dhcp-server, but this I think is nonsense. At WorldSkills, they were given such a task, and I feel that they would not have started collecting a special package for such a task.

Thank you in advance for your help.

  • for starters, I would remove the -i eth0 option, and then watch how packets go through all points. - aleksandr barakin
  • @alexanderbarakin This has been done already. Discover DHCP packets go the same way from the eth0 CLI-GW interface to the eth0 interface of the DHCP server. - Mistress Denna
  • But how do the answers reach? - aleksandr barakin
  • @alexanderbarakin Only a request comes to the eth interface of the DHCP server. The server itself does not respond at all, even though the condition is specified on the agent.circuit-id in the server. - Mistress Denna
  • and if to connect the client computer instead of cligw, then the dhcp-server sends the answer? if yes, 1. compare incoming requests. 2. See the logs of the dhcp server (you probably need to add “talkativeness” to it - verbosity) - aleksandr barakin

0