VMware vSphere

 View Only
  • 1.  Setting up a virtual DHCP server connecting with uplink port

    Posted Sep 27, 2018 10:24 PM

    Hello, I am trying to set up a DHCP server in ESXi 6.5. My plan is the server connect to a physical switch via uplink port(vmnic2) and provide DHCP IP to other computers. It sort of acts like a router.

    Please see the picture of the topology. The virtual server is a CentOS 7 and I set DHCP and routing already. It has another virtual network interface connected to vmnic1 and that interface can go to Internet.  There is a virtual machine windows 7 connected and it can get DHCP and use Internet via CentOS server. The physical adapters (vmnic2) connects to a switch. A laptop (Windows 7) also connects to the same switch. But the laptop doesn't get any IP. The laptop can ping the CentOS if I set a static IP in the same network. What can I do to make the laptop receive DHCP IP and use Internet like the virtual windows 7. Thank you.



  • 2.  RE: Setting up a virtual DHCP server connecting with uplink port

    Posted Sep 28, 2018 07:14 AM

    Hello Ivy2010,

    Usually, when the laptop is connected to the same network(subnet) it should gather an IP from DHCP.

    So, you say, you are connecting a laptop to a port in the same switch, I suppose the port is in the same VLAN as the portgroup "portGroup3".

    A thing you can do in the laptop is to sniffer traffic on the laptop's NIC to check if the the DHCP server is offering IPs:

    1. Download Wireshark

    2. Capture traffic from the laptop's NIC you are using and filter the DHCP traffic.

    3. Now, force to obtain a new IP (ipconfig /renew for example in Windows).

    4. As your laptop must be configured as "Obtain an IP automatically", you should be able to

    see these DHCP packets:

    DHCP Discover

    DHCP Offer

    DHCP Request

    DHCP ACK

    More information about DHCP traffic: DHCP - The Wireshark Wiki

    Dan Belmonte



  • 3.  RE: Setting up a virtual DHCP server connecting with uplink port

    Posted Sep 30, 2018 01:00 AM

    Thank you. I remotely connected to the physical laptop since I am not on the site. I lost the connection when I open wireshark. I guess the wifi is screwed up. I didn't have a chance to try to capture the packets. I will try later.

    I think the problem should be the laptop cannot receive DHCP offer. Laptop gets IP via DHCP normally when connecting to a router. You said you "suppose the port is in the same VLAN as the portgroup "portGroup3"."  I didn't set up this part. How can I assign a VLAN to a physical port? I checked around but don't see this option.

    My vmware have very limited features comparing the "vmware vSphere Web Client'. The website just show "vmware ESXi" on the upper left side. I was told the vSphere web client should be purchased. Mine is a free version. Am I able to assign a VLAN to a physical port in this situation? Thank you.



  • 4.  RE: Setting up a virtual DHCP server connecting with uplink port

    Posted Oct 03, 2018 12:17 PM

    Hello Ivy2010,

    About the VLAN, I meant that you are in the same subnet as the DHCP server.

    About the second part, if you are using a VMware ESXi (Hypervisor of VMware) this is not a problem, you have created a vSS (vSphere Standard Switch) and normally each portgroup has assigned a VLAN, because in this way the traffic is physically segmented.

    VLANs which are Virtual LANs are a logical segmentation of a network, so different ports from different switchs can divide the traffic in VLANs (think as a subnet) and then, devices can communicate.

    As said before, VLANs are configured on switch ports, so this is a network thing :smileyhappy: