VirtualBox

Ticket #4590 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

vboxnet0 has 255.0.0.0 netmask => fixed in SVN

Reported by: therp Owned by:
Priority: major Component: network/hostif
Version: VirtualBox 3.0.2 Keywords: opensolaris vboxnet0 netmask named
Cc: Guest type: other
Host type: Solaris

Description

After installing

-rw-r--r-- 1 root root 78155180 2009-07-10 17:35 VirtualBox-3.0.2-49928-SunOS.tar.gz

I get

vboxnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

inet 192.168.56.1 netmask ff000000 broadcast 192.255.255.255 ether 0:8:27:3c:7e:44

Look at the netmask. That covers a good deal of the "real net". That should be ffff0000.

Here is the story for people googling: This causes named to be unresponsive fail not answer. This is because the root dns it seems to prefer is within the public 192.x.x.x range, but those requests go to vboxnet0 now.

Change History

comment:1 Changed 5 years ago by ramshankar

Thanks for the report. In fact it should be ffffff00 (broadcast 192.168.56.*). This has been fixed in internal SVN and will be part of the next release.

comment:2 Changed 5 years ago by ramshankar

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from vboxnet0 has 255.0.0.0 netmask to vboxnet0 has 255.0.0.0 netmask => fixed in SVN

comment:3 Changed 4 years ago by therp

  • Status changed from closed to reopened
  • Resolution fixed deleted

I removed my VirtualBox 3.0.2 and reinstalled 3.1.4. netmask of vboxnet0 became ff000000 again. Sure this was fixed?

comment:4 Changed 4 years ago by ramshankar

How did you install 3.1.4? Was it through IPS/pkg repository?

comment:5 Changed 4 years ago by therp

Sorry for the imprecise report. No respository.

I got the tar.gz from the update-available popup, unpacked that,

pkgrm SUNWvbox pkgadd -d VirtualBox-3.1.4-SunOS-r57640.pkg

Btw: I'm available on irc. therp/freenode/#vbox-dev.

comment:6 Changed 4 years ago by ramshankar

Hmm no the /opt/VirtualBox/vboxconfig.sh script (which is called during postinstall phase) should explicitly set the mask correctly. Did you get any errors while installing/uninstalling?

comment:7 Changed 4 years ago by therp

No I didn't get any errors. I looked at vboxconfig.sh. In postinstall, there is:

$BIN_IFCONFIG vboxnet0 192.168.56.1 netmask 255.255.255.0 up

That's no persistent change. After rebooting vboxnet0 will jump back to 255.0.0.0.

The reason: The service svc:/network/physical:default calls /lib/svc/method/net-svc which runs "/usr/sbin/ifconfig -auD4 netmask + broadcast +".

That's what I get for this command:

clemens@alia:/var/svc# /usr/sbin/ifconfig -auD4 netmask + broadcast +
Setting netmask of nfo0 to 255.255.255.0
Setting netmask of vboxnet0 to 255.0.0.0

Frankly speaking I have no idea, where ifconfig gets the idea that vboxnet0 should be 255.0.0.0 but nfo0 should be 255.255.255.0 (the IP of nfo0 is 192.168.1.5 btw). I tried to "truss ifconfig vboxnet0 netmask +" with no appearant clue in the output where ifconfig got that idea from. So I looked at the source  http://src.opensolaris.org/source/xref/netvirt/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/ifconfig.c

The relevant code starts at line 1287 "setifnetmask", and eventually calls getnetmaskbyaddr in "in_getmask". I'm not sure if that code works correctly. in_getmask should be called with addr_set=FALSE from line 1294. As a result of that in_getmask should call ioctl(..., SIOCGLIFADDR, ...). But I don't see any call to LIFADDR.

I guess this is a dead end anyway. VirtualBox must add something that sets the vboxnet0 netmask on startup correctly.

comment:8 Changed 4 years ago by ramshankar

Could you try adding a line to /etc/netmasks with

192.168.56.1 255.255.255.0

Rebooting and see if the netmask comes up fine?

comment:9 Changed 4 years ago by therp

Works for me! Thanks.

Although I used

  192.168.56.0 255.255.255.0

That was more in line with the other netmask definitions in there.

comment:10 Changed 4 years ago by ramshankar

I'll fix VirtualBox to update the /etc/netmasks file on installing and remove the config. on uninstall. Thanks for the report.

comment:11 Changed 4 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in 3.1.6.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use