getting IP via DHCP in VirtualBox


New Member
Dec 20, 2018
Reaction score
Hi all,

I am an absolute Linux beginner, and need some assistance.

I have Centos7 core running in VirtualBox, and I want to set it up so that I get an IP address from our DHCP server. I have 2 adapters in my VirtualBox settings, first one is set to NAT, and second one is set to Host-Only.

When I run ip add show command, I see 3 results

1) lo - loopback. What is this?

2) enpos3 - This will be for my NAT, and I see inet brd

3) enp0s8 brd

So I think 2) is my NAT adapter settings, and 3) is my Host-Only settings, the first result is the IP address and 2nd is subnet mask? Is that correct?

I am sure this means I am getting an address from my local machine. How can I get one from the DHCP server instead? Or I am I on the wrong track?

Many thanks everyone

Hey px1 and Welcome :)
Weil i think 2 Looks like an Host only Adapter and 3 like the nat ( only because nat Looks at VMware in Range 192.168.x.x)
NAT is the adress translation from an private ip to the ip of the host you run Virtual Box. You Need something like a Host Bridge if you Wang to Optain your own dhcp adress for this vm.

Under File -> Preferences -> Network you can add a network and set the network IP address you want to connect to and select DHCP enabled. Under the settings for your Virtual Machine change your network adapter from NAT to NAT Network and select your network name you just created.

Hope this helps.

Staff online

Members online