0

I have the following:

  • 1 x Windows Server 2012 R2 (DHCP)
  • 1 x Windows 8.1 client
  • 1 x CentOS 7 (DMZ/Firewalld, minimal)
  • All in Hyper-V environment
  • Server attached to vPrivat Switch
  • Client attached to vPC Switch
  • DMZ eth0 attached to vExternal Switch

I'm guessing this is a common senario.

  • Windows Server is connected to the CentOS 7 on eth1 (192.168.10.3)
  • Windows client is connected to the CentOS 7 on eth2 (192.168.10.4)
  • CentOS 7 DMZ is connected to the Internet via eth0 (192.168.0.20)

NetworkManager is Disabled
-w net.ipv4.ip_forward=1 enabled
eth1 & eth2 assigned to internal zone, with DHCP service attached
eth0 set to external, with NAT

The server is able to connect to the internet
The server can ping eth2 (192.168.10.4)
But the client doesn't seem to get an IP from the DHCP.

I've tried:

  • Adding a static route from eth1 to eth2 and vice versa
  • Adding port 67 to the DHCP service
  • Tried to find some sort of IP-Helper, but failed to find one

So I'm wondering if this is even possible? Does the Windows DHCP server have to be on the same LAN/ethX, and not on a separate?

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47

1 Answers1

1

The DCHP client and server should be on the same physical subnet, since it relies on broadcasts. Otherwise you have to use a DHCP relay agent to forward the queries between the client and the server. "Normal" IP forwarding/routing is not enough. You can read about it at Wikipedia and here is a link to the CentOS documentation for instructions on how to set it up.

Two other solutions is to place both client and server on the same virtual switch, or using CentOS as DHCP server.

What is the purpose of this setup, by the way? :-)

PatrikN
  • 155
  • 6