OracleLinux 7.5 Virtual Box No IP

0

Host is Mac OS High Sierra VBox version is 5.2.16 Guest is Oracle Linux 7 VM Network Adaper type is Bridged

I installed and set this VM on whilst on network 172.16.21.0, and it worked fine with the VM getting a valid IP from the hosts network DHCP.

I took this Macbook to another site where they had a network with address ranges 192.168.1.0, and that too worked fine, i.e. the VM was assigned a IP address in that range from that networks DHCP server.

Today, I connect to another network at another site, with a 10.0.0.0 range, and now something very strange happens.

ifconfig enp0s3 reports no IP (4) address.

But nmcli reports a IP (v4) address in the expected range.

Connectivity to/from this VM is down.

I have tried disabling/reboot/enable the device within the VM and at the VBox level, but no affect.

Any ideas?

TenG

Posted 2019-01-11T17:03:28.097

Reputation: 101

Does the location allow multiple MAC addreses to get IP addresses? In this case, MAC is media address control, not an Apple product. Its common in larger organizations to restrict the number of IPs a switch port will allow based on the MAC address. If your host gets an IP, but the VM doesn't, I'd ask the site network admin if there is a restriction. – essjae – 2019-01-11T18:04:16.847

@essjae There is no restriction on the network. The weird thing is that nmcli reprost a 10.0.0.0 IP address, but ip/ifconfig commands do not. – TenG – 2019-01-11T18:12:21.357

Answers

0

Solution was to:

  • Shutdown ( halt ) the VM
  • Open the VM Settings in VBox
  • Select Network
  • Select the Network for the enp0s3 interface
  • Click advanced
  • Click the refresh Mac address button/icon
  • Restart the VM
  • Check ip addr show .. if it show an addr for enp0s3 then sorted
  • If it doesn't, run dhclient -v enp0s3

The above solved the issue for me.

Sometimes dhclient reports the expected IP addr but it doesn't show up immediately in ifconfig/ip. From the host PC I ping the IP shown by the dhclient command and then works and "registers" the IP with ifconfig.

Now, after restarting the ip addr show command might not show an IP address for the inter

TenG

Posted 2019-01-11T17:03:28.097

Reputation: 101