NAT-based interface is getting an incorrect static IP

Discussions about using Linux guests in VirtualBox.
Post Reply
sbanacho
Posts: 1
Joined: 31. Mar 2014, 20:46

NAT-based interface is getting an incorrect static IP

Post by sbanacho »

Hi,
I have two network interfaces defined for my guest host.
The first is using NAT, the second is using a host-only network, and the host-only network is configured with a fixed IP for the adapter.
When my linux guest boots, the first adapter (eth0), which is supposed to be matched with the NAT is getting assigned the same static IP I configured in the host-only network.
Then the second adapter (eth1) prints an error message, claiming the address it wants is already assigned.

If I type 'ifconfig' after booting, I see that both eth0 and eth1 claim the same ip address.
When I then run 'dhclient -r; dhclient' then eth0 is properly assigned to 10.0.2.15.

In /etc/sysconfig/network-scripts, eth0 is configured to use dhcp, and eth1 is configured to use its static address.

I'm baffled as to why this is happening. It seems like eth0, which is supposed to use dhcp at boot is being handed the static address. But then after boot, dhclient does the correct thing. I've double checked the MAC addresses in the configs, and don't see anything suspect with them.

Any clues about what is going wrong?
Post Reply