0

So I have a problem for which I don't think there is a direct solution. I have two separate [physical] networks, on two different interfaces of the same router. Each network has two subnets on it, one is public, one is in the RFC1918 private network space. Note that all subnets have a defined router interface and route defined, so effectively all 4 subnets can talk to each other, though only the two public subnets can actually communicate beyond the border router. (The private networks are for things like printers, switches, etc., which need to be accessible from everywhere in our organization, but from nowhere outside it.)

There is a DHCP server (ISC-DHCPD) on one of the networks (let's call it Network A), and some DHCP clients on the other (Network B). There is also a DHCP relay service on the Network B interface that relays requests to the server on Network A.

My question is, is it possible to dynamically assign addresses in the both the private and public network spaces to hosts on Network B, since the router is tagging all requests it forwards with the network of the public network? All of my hosts have reservations in the DHCPD conf file, so if a request comes in with a matching MAC address, I want it to say "you're a switch, so you get [some private address]", and "you're a computer, so you get [some public address]". This obviously works fine for hosts on Network A. However, the DHCP server is refusing to respond to the requests from the switches and printers on Network B because they appear to be coming from the public network (even though it's the same physical network).

From what I've read, this is impossible to do without VLAN tagging, but I'd like to double-check my research with the DHCP experts out there.

Thanks

ereisch
  • 121
  • 3

1 Answers1

0

Enable ip_forward on your gateway. IP forwarding should be enabled when you want the system to act as a router, that is transfer IP packets from one network to another.

  • That wasn't even remotely the question. Packets for hosts which have static IPs are getting through just fine, and the DHCP request packets are getting forwarded as well. Did you read the third paragraph? – ereisch Feb 02 '18 at 16:07
  • As far as I know, this is only possible with a VLAN or physical interface separating the networks. So you will be able to distribute ip's in different networks or subnets by linking certain ip to a particular mac, in different VLAN's or physical networks. and the ip_forward option on your gateway must be enabled to have communication on your networks and subnets. – Alessandro Schneider Feb 02 '18 at 19:21