0

I have Windows 7 installed as my primary operating system, on a laptop that's on my home network (wireless).

I'm using Microsoft Virtual PC 2007 SP1 to run a virtual machine of Windows XP SP3, in which I want to access the Windows 7 instance, both to browse a shared folder and access the local Apache server.

So far I can ping my Windows 7 IP address (IPv4) and access the apache server through the web browser through HTTP.

However using my machine name never seems to work. Pinging it fails, and I can't access my apache server using it either.

The problem seems to be something to do with my machine's name being registered under IPv6 rather than IPv4.

I'm at a loss what to do. Should I try to set up IPv6 on the virtual machine? Not sure how to go about that. Or maybe I should somehow get my machine name on Windows 7 to work with IPv4?

Although I think it already does, because I can ping it from a separate box (running Ubuntu), which is only registered under IPv6.

1
  • Do you have a DNS server?
    – Sam Cogan
    Jul 20, 2009 at 10:34

3 Answers 3

2

If you do not have DNS or WINS setup to do name resolution, and this is the one computer that you want to be able to ping/resolve by name, a quick fix would be to just add an entry to your hosts file (located in %SystemRoot%\system32\drivers\etc) on the Windows XP VM pointing to the Windows 7 host. It would look like:

192.168.1.5     mywin7hostname

Edit: Okay, based off of your response about IP addresses being assigned via DHCP, you still have a couple of options. The following TechNet article walks through the windows hostname resolution process: http://technet.microsoft.com/en-us/library/bb727005.aspx

When you are trying to ping the Windows 7 hostname, it is not local, you do not have a DNS server which rules out options 2 and 3, you do not have a WINS server which rules out options 4, and 5, which leaves you with NetBIOS broadcasts as the only way for your client to locate the Windows 7 hosts. Go into your Firewall on the Windows 7 box and make sure that you have Network Discovery (NB-Datagram-In) and Network Discovery (NB-Name-In) enabled for the network profile that includes the Windows XP box.

alt text http://i.technet.microsoft.com/Bb727005.chp7hn01(en-us,TechNet.10).gif

Alternately (and probably easier), assign a static IP (or use DHCP address reservation on your router) to the Win7 box in IP range of your network and use the hosts file on the Windows XP VM. Even in a managed corporate network with DNS and WINS, servers tend to be assigned static IP addresses for exactly this reason.

1
  • The problem is, all my machines (virtual and physical) are assigned IP's through DHCP. So this is why I wanted all access to be by DNS name in the first place, because I'm developing web pages that contain certain absolute URL references, and I don't want to have to keep updating them every time I reboot my laptop. Jul 20, 2009 at 6:09
0

One way is to allow NetBIOS broadcast which will work on the local IPv4 subnet as the Win7 box ... downside is, err, you have to open NetBIOS.

I believe in Vista/Win7 you can enable "Network Discovery" which includes the firewall rules for this.

Then, unless things have changed since I last did this, when the network stack gives up trying to find the computer name in DNS, it will broadcast for it and Win7 will answer.

Only works for short names, ie. not mywin7hostname.myisp.com; just mywin7hostname.

0

Try just switching off your router for a bit, then back on. It worked for me. Somehow the router had lost the relationships between the computer names and their ip addresses, and resetting it caused it to discover them again.

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