0

I have a "router" that is basically a computer with 4 network ports and Linux Centos installed that I will be calling Centos-Router from now on.

My operator cable router is configured with DHCP disabled and Port 4 as bridge to deliver a public IP address to my "router". On Centos-Router I have this connections: At enp1s0 port there is a cable that connects to the cable router port 4 (bridge); At enp2s0 port all my home network is connected, including another port of the cable router (it is providing WiFi); At enp3s0 port there is a cable to a remote network; At enp4s0 there is nothing;

The problem I have is that I cannot get my CentosRouter to receive the public IP address unless I stop the DHCPD service.

If I have DHCPD running with a regular configuration I will get an IP from enp2s0 sub net range in enp1s0 interface; I've tried to ignore or deny the requests for the mac address of the enp1s0 in dhcpd.conf port and I can avoid it from receiving a local IP address and it works (a local IP is not assigned), but it seems to block the assignments from the cable router bridge port and get this messages on the log:

May  1 18:57:34 multirouter dhcpd[3390376]: DHCPDISCOVER from xx:xx:xx:xx:xx:xx (multirouter) via enp2s0: booting disallowed
May  1 18:57:34 multirouter dhcpd[3390376]: DHCPREQUEST for 109.XXX.XXX.128 (95.XXX.XXX.254) from xx:xx:xx:xx:xx:xx via enp2s0: wrong network.
May  1 18:57:34 multirouter dhcpd[3390376]: DHCPNAK on 109.XXX.XXX.128 to xx:xx:xx:xx:xx:xx via enp2s0

109.XXX.XXX.128 Is the IP address I should be getting on CentosRouter; 95.XXX.XXX.254 Is the Gateway address that the cable has for it's own IP address (95.XXX.XXX.8).

The main problem seems to be that somehow the cable router is leaking packets from it's bridge port to the other ports, but even so, I should be able to somehow avoid the problem...

Any ideas of what I should try to avoid needing to stop DHCPD evey time I need to reconnect the public interface?

Cheers.

3
  • Just check the documentation on how to configure the DHCP server to handle only some interfaces rather than all of them.
    – A.B
    Oct 30, 2021 at 0:06
  • @A.B Do you think that the DHCP client (for port enp1s0) it not getting the address from leak packets in the cable router and instead is getting the packets directly from inside port enp1s0 DHCP server?
    – Cidi Rome
    Nov 4, 2021 at 11:32
  • @A.B : I did some investigation and I got to the file "/etc/systemd/system/dhcpd.service" and found "ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid enp2s0 enp3s0 enp4s0 $DHCPDARGS" This point to the fact, that in a previous attempt (that I don't remember) I already tried to prevent DHCPD to listen on enp1s0. Any more ideas?
    – Cidi Rome
    Nov 4, 2021 at 21:52

0

You must log in to answer this question.

Browse other questions tagged .