address of host-only adapter is changing

This is for discussing general topics about how to use VirtualBox.
Post Reply
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

address of host-only adapter is changing

Post by edstevens »

Vbox4.2.6 on Win7 Pro 64bit

When I first installed VBox on this machine, it created the Host-Only Ethernet Adapter as follows:

Code: Select all

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
   Physical Address. . . . . . . . . : 08-00-27-00-88-62
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::91bb:36e1:3c1:46f2%16(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 268959783
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-18-49-6A-0F-90-B1-1C-74-16-E4

   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled
I create my vm's with two NICs. eth0 is configured with NAT and DHCP assigned address. eth1 is configured host-only and given a fixed ip address. Given that the adapter is at 192.168.56.1, I assigne my vm's fixed address at 192.168.56.10n, where 'n' begins with 1, for my first vm, then increments up as I create additional vms.

But now, when I restart my host os, the adapter comes up with a new address:

Code: Select all

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
   Physical Address. . . . . . . . . : 08-00-27-00-88-62
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::91bb:36e1:3c1:46f2%16(Preferred)
   Autoconfiguration IPv4 Address. . : 169.254.70.242(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 268959783
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-18-49-6A-0F-90-B1-1C-74-16-E4

   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled
I can change it back with File > Preferences > Network, but it just changes again on the next restart of the host.

I've also been running VBox for over a year on my laptop (different machine -- Win7 Home Premium 64bit) and even with all the restarts one would expect on a traveling laptop, never observed this behavior.

So .. what's causing the adapter address to change, and what can I do to prevent it?

PS: in reviewing this before posting, I noticed the line "Autoconfiguration Enabled . . . . : Yes" Is this related? When I look at the network config under preferences (in the vbox manager) it says "adapter: manually configured" and there seems to be no option for selecting anything different.
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

Re: address of host-only adapter is changing

Post by edstevens »

follow up ..

After googling some more I see several posts on this or closely related. Like this one: viewtopic.php?f=6&t=52561, suggesting disableing 'Network Activity Hook Server Lightweight filter Driver'. But when I drill down through "Network SHaring Center" and get to the VirtualBox Host-Only Network Properties, that option is not listed.

And whereas before I started trying to run this to ground, if I changed the vbox preferences to set the adapter's ip back to its original value, it would immediately reconfigure the adapter, and that would hold until the next host restart, now it is suddenly having no effect at all. In fact, if I simply close and reopen the vbox console, the ip and net mask are reverted back.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: address of host-only adapter is changing

Post by Perryg »

If you have updated VirtualBox I would suggest that you un-install it and then install again. Your guest should be picked up, but I always suggest a backup which should be done regularly anyway.
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

Re: address of host-only adapter is changing

Post by edstevens »

Perry,

Thanks for the reply. After twice dropping and recreating the hostonly adapter (twice) things seem to have stabilized. I'm not a network guy, though as a DBA I have to deal with a lot of network stuff at a somewhat superficial level. Just a few more observations, and I'm not sure if there is any connection or not:

- The first few times this change of adapter address occurred, I was able to change it back at the VBox network preferences, and the change took immediately, and held until the next reboot of the host. Then yesterday, while I was really focusing on finding a permanent solution, I found that not only did the change not take at all (as shown by ipconfig) it didn't even hold within VBox if I closed and reopened the VB Manager.

- In addition to several vm's I have PuTTY sessions defined on 6 Oracle Linux 5.6 servers in my data center. Two of them are in a DMZ, and beginning yesterday morning I couldn't connect to them. The really curious thing about that was when I tried to ping them, it tried to route through the VBox net adapter! I was able to connect to the non-DMZ servers. I reported that to my net admin, and he was working on firewall rules and my ip assignment while I was beating on the VBox net adapter. It wasn't until he changed a firewall rule and assigned me a fixed IP (about the same time I was dropping and recreating the adapter) that I was able to get the adapter address back to where I wanted it. I don't know if there might be a relationship or not, as I have no idea how VB determines the address it wants to assign to the adapter. My google searches turned up a couple of bug reports that sound very similar to my situation, as well as several blog posts.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: address of host-only adapter is changing

Post by Perryg »

That very well may be but I know they rewrote some of the host-only code to address host-only issues. On Linux it probably would not matter but Windows looks at these changes differently. I read about a lot of users that had similar issue as you and went the uninstall reinstall route and fixed their issue.
Post Reply