VMware Communities
Ultimate1234
Contributor
Contributor
Jump to solution

DHCP doesn't set an IP for NAT/Bridge interfaces over guest OS

Hey All,

I have seen a very worrying issue which is not always reproduced.

It seems like my interfaces for NAT/Bridge adapters doesn't get an IP from the DHCP, when I am running 'dhclient eth0/eth1' the command just stuck!

as a workaround, I remove my adapters and create them again... ( in some of time it helps and sometimes not ).

Does anyone know what could cause this issue?

ENV details:

VM workstation 15

Kali as Guest OS.

if you need any more details please let me know.

Thanks,

Ariel. 

Reply
0 Kudos
1 Solution

Accepted Solutions
continuum
Immortal
Immortal
Jump to solution

You still use automatic bridging for vmnet0.
Assign a physical network card instead.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

View solution in original post

Reply
0 Kudos
7 Replies
continuum
Immortal
Immortal
Jump to solution

The VMware DHCP will never give you an IP when you use a bridged network - that is expected behaviour. This would interfere with local DHCP-server / local routers.
A screenshot of Virtual Network Editor and the vmx-file of your VM would be helpful


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
Ultimate1234
Contributor
Contributor
Jump to solution

Thanks for your quick reply.

attacked is a screenshot of my network configuration.

just to clarify, I am trying to add two interfaces:

eth0 - should give me Internat access via my physical host.

eth1 - should be virtual networks for internal communication between VM's.

vmx file:

.encoding = "windows-1252"

config.version = "8"

virtualHW.version = "8"

numvcpus = "4"

scsi0.present = "TRUE"

scsi0.virtualDev = "lsilogic"

memsize = "8192"

scsi0:0.present = "TRUE"

scsi0:0.fileName = "Kali-Linux-2019.1-vm-i386.vmdk"

ide1:0.present = "TRUE"

ide1:0.autodetect = "TRUE"

ide1:0.deviceType = "cdrom-raw"

usb.present = "TRUE"

ehci.present = "TRUE"

ehci.pciSlotNumber = "35"

sound.present = "TRUE"

sound.startConnected = "FALSE"

sound.fileName = "-1"

sound.autodetect = "TRUE"

pciBridge0.present = "TRUE"

pciBridge4.present = "TRUE"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "TRUE"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "TRUE"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "TRUE"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "TRUE"

hpet0.present = "TRUE"

usb.vbluetooth.startConnected = "TRUE"

displayName = "Kali-Linux-2019.1-vm-i386"

guestOS = "debian8"

nvram = "Kali-Linux-2019.1-vm-i386.nvram"

virtualHW.productCompatibility = "hosted"

powerType.powerOff = "soft"

powerType.powerOn = "soft"

powerType.suspend = "soft"

powerType.reset = "soft"

extendedConfigFile = "Kali-Linux-2019.1-vm-i386.vmxf"

ide1:0.fileName = "auto detect"

usb.generic.autoconnect = "FALSE"

usb.generic.allowHID = "TRUE"

mks.enable3d = "TRUE"

isolation.tools.hgfs.disable = "FALSE"

tools.syncTime = "TRUE"

numa.autosize.vcpu.maxPerVirtualNode = "4"

numa.autosize.cookie = "40001"

uuid.bios = "56 4d 93 14 aa 55 0b 0b-48 7f be b4 ef 5c 46 bc"

uuid.location = "56 4d 93 14 aa 55 0b 0b-48 7f be b4 ef 5c 46 bc"

migrate.hostlog = ".\Kali-Linux-2019.1-vm-i386-1a53fb76.hlog"

scsi0:0.redo = ""

pciBridge0.pciSlotNumber = "17"

pciBridge4.pciSlotNumber = "21"

pciBridge5.pciSlotNumber = "22"

pciBridge6.pciSlotNumber = "23"

pciBridge7.pciSlotNumber = "24"

scsi0.pciSlotNumber = "16"

usb.pciSlotNumber = "32"

sound.pciSlotNumber = "34"

vmci0.pciSlotNumber = "36"

vmci0.id = "361554234"

monitor.phys_bits_used = "40"

vmotion.checkpointFBSize = "134217728"

cleanShutdown = "FALSE"

softPowerOff = "FALSE"

usb:1.speed = "2"

usb:1.present = "TRUE"

usb:1.deviceType = "hub"

usb:1.port = "1"

usb:1.parent = "-1"

checkpoint.vmState = ""

tools.remindInstall = "FALSE"

ide1:0.startConnected = "FALSE"

annotation = "Kali Rolling (2019.1) x86|0D|0A2019-02-11|0D|0A|0D|0A- - - - - - - - - - - - - - - - - -|0D|0A|0D|0AUsername: root|0D|0APassword: toor|0D|0A(US keyboard layout)|0D|0A|0D|0A- - - - - - - - - - - - - - - - - -|0D|0A|0D|0A* Kali Homepage:|0D|0Ahttps://www.kali.org/|0D|0A|0D|0A* VM Homepage:|0D|0Ahttps://www.offensive-security.com/kali-linux-vmware-virtualbox-image-download/|0D|0A|0D|0A* Documentation:|0D|0Ahttps://docs.kali.org/|0D|0A|0D|0A* Forum/Support:|0D|0Ahttps://forums.kali.org/|0D|0A|0D|0A* Kali Tools:|0D|0Ahttps://tools.kali.org/|0D|0A|0D|0A* Bug Tracker:|0D|0Ahttps://bugs.kali.org/|0D|0A|0D|0A* IRC Channel:|0D|0Airc://irc.freenode.net/#Kali-Linux|0D|0A|0D|0A* Release Information:|0D|0Ahttps://www.kali.org/kali-linux-releases/|0D|0A"

serial0.present = "FALSE"

floppy0.present = "FALSE"

gui.exitOnCLIHLT = "TRUE"

toolsInstallManager.updateCounter = "4"

toolsInstallManager.lastInstallError = "21004"

gui.lastPoweredViewMode = "fullscreen"

tools.upgrade.policy = "useGlobal"

usb:0.present = "TRUE"

usb:0.deviceType = "hid"

usb:0.port = "0"

usb:0.parent = "-1"

ethernet0.pciSlotNumber = "33"

ethernet0.connectionType = "nat"

ethernet0.addressType = "generated"

ethernet0.displayName = "VMnet1"

ethernet0.present = "TRUE"

ethernet0.generatedAddress = "00:0C:29:5C:46:BC"

ethernet0.generatedAddressOffset = "0"

ethernet1.pciSlotNumber = "37"

ethernet1.connectionType = "custom"

ethernet1.addressType = "generated"

ethernet1.vnet = "VMnet1"

ethernet1.displayName = "VMnet1"

ethernet1.present = "TRUE"

ethernet1.generatedAddress = "00:0c:29:5c:46:c6"

ethernet1.generatedAddressOffset = "10"

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

I sorted your vmx-file.
The relevant lines are:

ethernet0.addressType = "generated"

ethernet0.connectionType = "nat"

ethernet0.displayName = "VMnet1"

ethernet0.generatedAddress = "00:0C:29:5C:46:BC"

ethernet0.generatedAddressOffset = "0"

ethernet0.pciSlotNumber = "33"

ethernet0.present = "TRUE"

ethernet1.addressType = "generated"

ethernet1.connectionType = "custom"

ethernet1.displayName = "VMnet1"

ethernet1.generatedAddress = "00:0c:29:5c:46:c6"

ethernet1.generatedAddressOffset = "10"

ethernet1.pciSlotNumber = "37"

ethernet1.present = "TRUE"

ethernet1.vnet = "VMnet1"

Remove those lines and replace them with

ethernet0.present= "true"

ethernet0.startConnected = "true"

ethernet0.virtualDev = "e1000"

ethernet0.connectionType = "custom"

ethernet0.vnet = "vmnet0"

ethernet1.present= "true"

ethernet1.startConnected = "true"

ethernet1.virtualDev = "e1000"

ethernet1.connectionType = "custom"

ethernet1.vnet = "vmnet1"
This assumes that you have configured vmnet0 as bridged and vmnet1 as hostonly.
On vmnet0 your VM should receive an IP from your local router.
On vmnet1 your VM should receive an IP from the VMware DHCP server active on vmnet1 (hostonly)
Please show me a screenshot of Virtual Network Editor  .... Menu > Edit > Virtual Network Editor


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
Ultimate1234
Contributor
Contributor
Jump to solution

Thanks for your reply... after replacing the lines the problem is still not solved Smiley Sad

attached is the new vmx file and a screenshot of my virtual network editor.

.encoding = "windows-1252"

config.version = "8"

virtualHW.version = "8"

numvcpus = "4"

scsi0.present = "TRUE"

scsi0.virtualDev = "lsilogic"

memsize = "8192"

scsi0:0.present = "TRUE"

scsi0:0.fileName = "Kali-Linux-2019.1-vm-i386.vmdk"

ide1:0.present = "TRUE"

ide1:0.autodetect = "TRUE"

ide1:0.deviceType = "cdrom-raw"

usb.present = "TRUE"

ehci.present = "TRUE"

ehci.pciSlotNumber = "35"

sound.present = "TRUE"

sound.startConnected = "FALSE"

sound.fileName = "-1"

sound.autodetect = "TRUE"

pciBridge0.present = "TRUE"

pciBridge4.present = "TRUE"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "TRUE"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "TRUE"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "TRUE"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "TRUE"

hpet0.present = "TRUE"

usb.vbluetooth.startConnected = "TRUE"

displayName = "Kali-Linux-2019.1-vm-i386"

guestOS = "debian8"

nvram = "Kali-Linux-2019.1-vm-i386.nvram"

virtualHW.productCompatibility = "hosted"

powerType.powerOff = "soft"

powerType.powerOn = "soft"

powerType.suspend = "soft"

powerType.reset = "soft"

extendedConfigFile = "Kali-Linux-2019.1-vm-i386.vmxf"

ide1:0.fileName = "auto detect"

usb.generic.autoconnect = "FALSE"

usb.generic.allowHID = "TRUE"

mks.enable3d = "TRUE"

isolation.tools.hgfs.disable = "FALSE"

tools.syncTime = "TRUE"

numa.autosize.vcpu.maxPerVirtualNode = "4"

numa.autosize.cookie = "40001"

uuid.bios = "56 4d 93 14 aa 55 0b 0b-48 7f be b4 ef 5c 46 bc"

uuid.location = "56 4d 93 14 aa 55 0b 0b-48 7f be b4 ef 5c 46 bc"

migrate.hostlog = ".\Kali-Linux-2019.1-vm-i386-1a53fb76.hlog"

scsi0:0.redo = ""

pciBridge0.pciSlotNumber = "17"

pciBridge4.pciSlotNumber = "21"

pciBridge5.pciSlotNumber = "22"

pciBridge6.pciSlotNumber = "23"

pciBridge7.pciSlotNumber = "24"

scsi0.pciSlotNumber = "16"

usb.pciSlotNumber = "32"

sound.pciSlotNumber = "34"

vmci0.pciSlotNumber = "36"

vmci0.id = "361554234"

monitor.phys_bits_used = "40"

vmotion.checkpointFBSize = "134217728"

cleanShutdown = "FALSE"

softPowerOff = "FALSE"

usb:1.speed = "2"

usb:1.present = "TRUE"

usb:1.deviceType = "hub"

usb:1.port = "1"

usb:1.parent = "-1"

checkpoint.vmState = ""

tools.remindInstall = "FALSE"

ide1:0.startConnected = "FALSE"

annotation = "Kali Rolling (2019.1) x86|0D|0A2019-02-11|0D|0A|0D|0A- - - - - - - - - - - - - - - - - -|0D|0A|0D|0AUsername: root|0D|0APassword: toor|0D|0A(US keyboard layout)|0D|0A|0D|0A- - - - - - - - - - - - - - - - - -|0D|0A|0D|0A* Kali Homepage:|0D|0Ahttps://www.kali.org/|0D|0A|0D|0A* VM Homepage:|0D|0Ahttps://www.offensive-security.com/kali-linux-vmware-virtualbox-image-download/|0D|0A|0D|0A* Documentation:|0D|0Ahttps://docs.kali.org/|0D|0A|0D|0A* Forum/Support:|0D|0Ahttps://forums.kali.org/|0D|0A|0D|0A* Kali Tools:|0D|0Ahttps://tools.kali.org/|0D|0A|0D|0A* Bug Tracker:|0D|0Ahttps://bugs.kali.org/|0D|0A|0D|0A* IRC Channel:|0D|0Airc://irc.freenode.net/#Kali-Linux|0D|0A|0D|0A* Release Information:|0D|0Ahttps://www.kali.org/kali-linux-releases/|0D|0A"

serial0.present = "FALSE"

floppy0.present = "FALSE"

gui.exitOnCLIHLT = "TRUE"

toolsInstallManager.updateCounter = "4"

toolsInstallManager.lastInstallError = "21004"

gui.lastPoweredViewMode = "fullscreen"

tools.upgrade.policy = "useGlobal"

ethernet0.present= "true"

ethernet0.startConnected = "true"

ethernet0.virtualDev = "e1000"

ethernet0.connectionType = "custom"

ethernet0.vnet = "vmnet0"

ethernet1.present= "true"

ethernet1.startConnected = "true"

ethernet1.virtualDev = "e1000"

ethernet1.connectionType = "custom"

ethernet1.vnet = "vmnet1"

ethernet0.pciSlotNumber = "33"

ethernet1.pciSlotNumber = "37"

ethernet0.addressType = "generated"

ethernet0.generatedAddress = "00:0c:29:5c:46:bc"

ethernet0.generatedAddressOffset = "0"

ethernet1.addressType = "generated"

ethernet1.generatedAddress = "00:0c:29:5c:46:c6"

ethernet1.generatedAddressOffset = "10"

usb:0.present = "TRUE"

usb:0.deviceType = "hid"

usb:0.port = "0"

usb:0.parent = "-1"

appreciate your help!

Ariel.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

You still use automatic bridging for vmnet0.
Assign a physical network card instead.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
Ultimate1234
Contributor
Contributor
Jump to solution

Thanks, it worked!

God bless you and God bless America! Smiley Happy

Reply
0 Kudos
Ultimate1234
Contributor
Contributor
Jump to solution

Well, I guess I was a little hurried ...

I did have internet access after I selected the physical network card but after an hour my internet connection is lost ! ( i didn't change any configuration )

trying to ping google.com gives me: " ping google.com: Name or service not known ".

Any idea why it happens and how can i fix it ?

reboot the vm fix it but I can't repeat it Smiley Sad

please advise,

Thanks,

a

Reply
0 Kudos