"Host-Only Network with Internet Sharing" woes...

Discussion in 'Parallels Desktop for Mac' started by robur, Jul 27, 2006.

  1. robur

    robur Bit poster

    Messages:
    1
    Hello Everyone!

    I just purchased a copy of windows XP, and will definitley buy Parallels if we can get this to work.
    For refrence: here is my configuration:

    Host: MacBook running OS X.4.7
    Guest: XP Home Edition
    Software: Parallels build 1848
    Internet: T-Mobille cellphone used by OS X as a bluetooth modem

    I am a web application developer, and I occasionally need to do testing in a windows enviroment.
    I have the precanned Apache webserver running on OS X, and used NetInfo Manager to set up a bunch of *.loc domains to point to localhost. I have a (really cool PHP webserver I built) running inside of Apache, and it serves the correct site for each domain.

    Objectives:

    1) Connect to the internet from inside windows.
    2) Test all my .loc domains from inside windows.

    Status:

    I have ben reading a WHOLE bunch :), and it seems what I need is called "Host-Only Network with Internet Sharing". I have tried to set this up in the following way:

    1) Enable internet sharing from system prefrences: from Bluetooth, to Ethernet (en2)
    2) Set my Parallels network adapter to: "Host-only networking; Virtual Network Adapter"
    3) Create a "Local area connection" inside windows with the Parallels network adapter:

    After clicking repair, it gave me the following information in the "Support > Details" tab.
    (Note theat the ip address was changed manually by me after reading something about address in the 192.168.2.XX range causing problems. It didn't work before I changed it, either)

    Physical Address: 00-0B-7D-71-14-59
    IP Address: 192.168.5.2
    Subnet Mask: 255.255.255.0
    Default Gateway:
    DNS Server:
    WINS Server:

    It said it was working correctly, but IE will not view any pages (or IP addresses).
    (Yes, the mac side gets on the internet fine)

    I read several places (http://forum.parallels.com/thread158.html) that I will need to get on the internet and have an assigned IP address before I can view my .loc domais. I don't quite understand this, but hopefully someone will be able to clarify it.
    Reading the parallels help didn't really give me any information, and browsing the forums gave me way too much :)

    Thank You,

    -Aubrey
     
  2. itsdapead

    itsdapead Hunter

    Messages:
    177
    That sounds like an overkill, and I'm not even sure it would work (does Internet Connection Sharing serve locally defined hostnames, or does it just pass everything to the upstream DNS?)

    I assume that you don't actually need to be on the internet (and, if you're on a cellphone, you'd probably not be).

    Here's what I'd do:

    1. Go back to plain "host only" networking, put the addresses back to their defaults, turn off internet connection sharing, restart parallels.

    2. Work out the IP address of the virtual network adaptor - on the Mac side, open a terminal and type "ifconfig" - you should find that your mac has gained an extra ethernet adaptor. Make a note of its IP address - its probably 10.37.129.2

    3. On windows, start the browser and go to http://10.37.129.2 - you should get your mac's default web page. If not, you've probably got the address wrong.

    4. Now, on windows, there is a file called C:/Windows/system32/drivers/etc/hosts - open this up in NotePad and add a line:
    10.37.129.2 mysite.loc myothersite.loc mymac.loc
    Save it, and you should be in business.

    There are more elegant (=compicated) ways, but that should get you up and running. You could install dnsmasq on the mac (via MacPorts or Fink) and or try and work out what tools Internet Sharing is using and tweak those to do what you want.
     
  3. unused_user_name

    unused_user_name Pro

    Messages:
    495
    You could also install Bonjour for Windows. I believe that allows *.local names to be used in IE.

    Just a thought....
     
  4. darkone

    darkone Forum Maven

    Messages:
    804
    I find this never fails to work, if I get the Parallels virtual machine up and running and THEN start the Internet connection sharing under OSX.. Ive never had to mess with 192 network addreses if i do it this way as he 10.37 range that parallels has already setup, works fine.

    The EN2 interface on the Mac has 10.37.129.2 as its ip, and I have Xp under parallels use DHCP to get an address in the same 10.37.129. address space.

    Once the VM is running, start the connection sharing from System Prefs on osx and then in Xp open a command prompt and set a route up :-

    route add 0.0.0.0 mask 0.0.0.0 10.37.129.2 1

    and hey presto... (as the addreses dont usually change, you can probably batch file this on your desktop.)
     
  5. Web-JIVE

    Web-JIVE Bit poster

    Messages:
    5
    I followed these directions and I get a message back:

    route: bad argument 1

    Any ideas? My en2 IP address is the same as you have posted but my VM IP is in the 192 range. I'm not very good at IP math. :-\
     
  6. darkone

    darkone Forum Maven

    Messages:
    804

    that'll be because of your ip in windows being 192.x is this hard set or dhcp ? make sure dhcp in parallels preferences is handing out addresses in the 10.37.129 range, not 192. whatever..
     
  7. Web-JIVE

    Web-JIVE Bit poster

    Messages:
    5
    Hmm.... did that earlier and parallels is still doling out 192 addresses. I'm running it in bridged mode to maintain access to the internet. When in host only mode, I don't have any problems. Is that what's stopping me?

    Thanks!

    UPDATE: I got it working another way. I used host only/internet sharing under OSX and got it working. Not elegant but it is working.
     
    Last edited: Oct 12, 2006
  8. darkone

    darkone Forum Maven

    Messages:
    804
    umm wasnt that what you were originally trying ? The topic of the problem was using host only networking ;)
     
  9. Web-JIVE

    Web-JIVE Bit poster

    Messages:
    5
    kkkkkk.... so i'm a little A.D.D. what was it i was saying... :p
     
  10. darkone

    darkone Forum Maven

    Messages:
    804
    hehehe ;) .
     

Share This Page