VMware vSphere

 View Only
  • 1.  How to enable DHCP for a vmnic?

    Posted Mar 31, 2011 02:50 PM

    Hi,

    The vmnic (physical NICs) have DHCP and IP/Subnet mask properties in the MOB. But how do we set these? I could not figure out a CLI or a way to do so from vSphere client.

    Regards,

    Watsh



  • 2.  RE: How to enable DHCP for a vmnic?

    Posted Mar 31, 2011 02:55 PM

    there should be no configuration necessary to the NICs.  All you need to do is to ensure your guest has a network adapter that is connected a a VM port group that is DHCP



  • 3.  RE: How to enable DHCP for a vmnic?

    Posted Apr 01, 2011 03:26 PM

    I think you are confusing a vmnic with a vmknic.

    vmknics have ip addresses and stuff vmnics dont.



  • 4.  RE: How to enable DHCP for a vmnic?

    Broadcom Employee
    Posted Apr 01, 2011 04:04 PM

    vmnic = A real phyiscal interface on an ESX host

    vmknic = virtual network interface that is used by the VMKernel

    vswif = The virtual ethernet interface that is used by the service console



  • 5.  RE: How to enable DHCP for a vmnic?

    Posted Apr 01, 2011 07:20 PM

    I know vmknics have IP address and that they can be configured with static or DHCP allocated ones.

    But in the MOB and vSphere SDK API, there is a DHCP, IP address and subnet mask properties associated to a physical NIC too and its always unset. So I needed to know how those properties can be changed (for API see: http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.host.PhysicalNic.Specification.html and for MOB lookup the path: Property Path: config.network.pnic["key-vim.host.PhysicalNic-vmnic1"].spec.ip).



  • 6.  RE: How to enable DHCP for a vmnic?

    Posted Jun 23, 2011 09:58 PM

    I found the solution. We need to use the ifconfig command to set the vmnic's IP address as shown below:

    ifconfig eth0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255

    Assign eth0 with the above values for IP, netmask and broadcast address.

    To enable dhcp on a given vmnic:

    dhclient eth0

    Renews the IP address.