3

I had installed virtualbox 4.2.2 in Windows 7.

My Computer Name is: MY-PC
My IP address (using ipconfig /all command) is: 192.168.1.101
My IP is dynamic and I set DNS to google dns (8.8.8.8)

When I ping MY-PC, I got this result:

Pinging MY-PC [192.168.56.1] with 32 bytes of data:
Reply from 192.168.56.1: bytes=32 time<1ms TTL=128
Reply from 192.168.56.1: bytes=32 time<1ms TTL=128
Reply from 192.168.56.1: bytes=32 time<1ms TTL=128
Reply from 192.168.56.1: bytes=32 time<1ms TTL=128

My virtualbox was not running and I expected the ip adress of MY-PC is 192.168.1.101, not 192.168.56.1


Then I run command: nbtstat -a MY-PC and I got this result:

VirtualBox Host-Only Network:
Node IpAddress: [192.168.56.1] Scope Id: []

           NetBIOS Remote Machine Name Table

       Name               Type         Status
    ---------------------------------------------
    MY-PC          <00>  UNIQUE      Registered
    WORKGROUP      <00>  GROUP       Registered
    MY-PC          <20>  UNIQUE      Registered

    MAC Address = 08-00-27-00-60-B3


Local Area Connection:
Node IpAddress: [0.0.0.0] Scope Id: []

    Host not found.

Wireless Network Connection:
Node IpAddress: [192.168.1.101] Scope Id: []

           NetBIOS Remote Machine Name Table

       Name               Type         Status
    ---------------------------------------------
    MY-PC          <00>  UNIQUE      Registered
    WORKGROUP      <00>  GROUP       Registered
    MY-PC          <20>  UNIQUE      Registered

    MAC Address = 94-0C-6D-E5-6D-5D

So it seems virtualbox caused this problem. I want to know how to change back my Computer Name's ip address to 192.168.1.101 (or any ip address that set by my internet connection)?

2 Answers 2

2

Your IP address hasn't changed. VirtualBox added a virtual network adapter so as far as Windows is concerned your machine is on two networks, your regular WiFi network (on which your IP is 192.168.1.101) and a virtual network that VirtualBox VMs communicate on (on which your IP is 192.168.56.1).

Other machines on your network should be able to see your PC on 192.168.1.101, and won't be able be able to see 192.168.56.1(depending on how you have VitualBox configured).

Update

You should be able to override the NetBIOS priority of the interfaces by adding a line to your hosts file specifying the MY-PC host name and the 192.168.1.100 address.

6
  • Hi, I think I misunderstood the source of problem, I just found out the root cause. Actually, I have application server using postgresql db that tried to connect to MY-PC, but I didn't put 192.168.56.1 entry in pg_hba.conf (host authentication config file). But the problem is indeed because MY-PC is associated first with virtualbox ip address (192.168.56.1), as showed by nbtstat. So, is there a way to arrange the MY-PC's ip address association order? I want to put my wireless connection's ip address (192.168.1.101) at top order.
    – null
    Oct 30, 2012 at 3:54
  • The order of the adapters in nbtstat shouldn't cause any problems. Is there a specific connection problem you're seeing? Oct 30, 2012 at 4:18
  • now there is no problem anymore. But I prefer MY-PC is associated first with my wireless/lan ip (192.168.1.101). I'm afraid in future, I would met same problem with other application server.
    – null
    Oct 30, 2012 at 5:23
  • See my update. I haven't tested this, but I think it should work. Oct 30, 2012 at 5:31
  • yes, it's working, but my ip is dynamic.
    – null
    Oct 30, 2012 at 6:23
0

I had a problem with this also. Simply installing the Vbox software creates a virtual address of 192.168.56.1. The problem is that if you are in a workgroup without the pc names in dns then the names of all of the pcs resolve to the VBOx address. I worked around it by putting a host file with the names to ip addresses but it would be great to turn this off in vbox.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .