-1

i have server with windows server 2019 with dhcp server role installed

i'v created this scope: 192.168.9.1 - 192.168.9.10 with subnet 255.255.0.0

also i'v created a virtual lan card with this ip: 192.168.70.1 / 255.255.255.0 for hyper-v

screenshot: https://i.stack.imgur.com/dtLIa.png

i'v create a hyper-v new machine and the machine getting the dhcp from 192.168.70.1

how she get dhcp if the virtual lan is on 192.168.70.1 and even she not getting response when she

trying to ping it , how is that ?


Yea but if my scope is 192.168.9.1 / 24 , and my virual lan swich is 192.168.14.1 / 24 , then the hyper v machine not getting the dhcp ip

I would love to receive your opinion, thank you

mikuzan
  • 11
  • 3
  • How exactly is the layer 2 configured in your case? – Tero Kilkanen Dec 01 '22 at 07:49
  • @mikuzan: Your router needs to be configured to forward DHCP broadcasts. If there isn't a router or you don't have a router, then you will need to use a DHCP Relay Agent. – Greg Askew Dec 01 '22 at 11:17
  • there is no router just dhcp server role , if my scope is 192.168.9.1 / 24 , and my virual lan swich is 192.168.14.1 / 24 , then the hyper v machine not getting the dhcp ip , if my scope is 192.168.9.1/16 then the machine getting dhcp – mikuzan Dec 01 '22 at 11:43
  • @mikuzan how is the vSwitch configured? – vidarlo Dec 18 '22 at 16:10

1 Answers1

-1

It is possible because essentially DHCP does not work with IP addresses. It works with an Ethernet broadcast.

The DHCP request is not IP bound - how can it, given that the client requesting it has no IP Address. It is, instead, an Ethernet Broadcast. AS IS THE ANSWER an Ethernet packet that is NOT IP.

If the server gets the DHCP request, it hands out an IP Address. The SUBNET is irrelevant here - what is relevant is the Ethernet broadcast domain. You should isolate subnets ALSO by VLAN if you want to isolate them.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • Yea but if my scope is 192.168.9.1 / 24 , and my virual lan swich is 192.168.14.1 / 24 , then the hyper v machine not getting the dhcp ip – mikuzan Dec 01 '22 at 12:16
  • @TomTom This doesn't make sense. Why should the DHCP be handing out addresses outside the scope? My guess would be that Hyper-V does this automagically. Telling the user to learn basics is not very helpful when - as far as I can tell - the user *knows* basics, and wonders why Hyper-V doesn't adhere to basics. – vidarlo Dec 18 '22 at 15:55