Hello.
Such a problem: there are 3 routers on Linux: 
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.
-i eth0option, and then watch how packets go through all points. - aleksandr barakin