Best way to network to the Mac?

Discussion in 'Linux Guest OS Discussion' started by talmy, Jun 23, 2007.

  1. talmy

    talmy

    Messages:
    24
    In order to get the ability to transfer files between the Linux VM and my Mac (in much the same way that this is automatically done by Parallels for a Windows VM) I've set the configuration to "Bridged Ethernet" and enabled Samba in the (Ubuntu) Linux VM. I've used Samba for a long time because prior to getting Macs I had a Windows and Linux mixed environment, so it seemed the natural way. My Macs have Samba enabled anyway to communicate with a Windows server.

    Question -- should I do this with NFS instead. I've no experience with NFS, but I would think this would be more native both on the Mac and Linux. Should I try "Shared networking"? My gut says "no" but maybe I'm looking at this wrong. Seems to make sense to have the VM be a full LAN citizen.
     
  2. filologen

    filologen

    Messages:
    3
  3. itsdapead

    itsdapead

    Messages:
    177
    If it ain't broke, don't fix it. Sounds lilke you know how to work Samba & you need samba shares on your Mac's anyway. If its doing what you need, stick with it.

    Bear in mind that there is no GUI on the Mac side to configure NFS shares (there's a handy bit of shareware called NFS Manager, though).
    [/QUOTE]

    If you've got your own, safe, LAN with its own router and firewall then I'd say bridged is best. Shared is handy if you've just got a straight ADSL modem link (no router) or are connecting to a corporate LAN that requires registration, or an insecure one. Unless you want the VM quarantined or something.

    An interesting question, though, (and one which I don't know the answer to) is whether the "host only" interface is any faster than the "physical" one. Trying some "pings" suggests no difference... anybody know what they're talking about here?
     
  4. AlanH

    AlanH Kilo Poster

    Messages:
    316
    I don't think there should be any significant difference between host-only and bridged in terms of performance. In both cases the VM is talking to the host OS directly via the ethernet adapter. There *may* be some tiny overhead for network address translation in host-only mode that isn't present in bridged mode, but I doubt if you could measure it on a fast CPU.
     
  5. itsdapead

    itsdapead

    Messages:
    177
    Is the communication "throttled" to the speed of the connected network? If I "ping" the host from the vm over a bridged connection, I can see from my router lights that the traffic is going out on the lan segment (which makes sense - since a bridged connection is supposedly equivalent to the VM having its own NIC plugged directly into the LAN).

    Is this anything to do with the difference between the generic Realtek NIC driver and the (currently windows-only) custom Parallels driver?
     
  6. AlanH

    AlanH Kilo Poster

    Messages:
    316
    I suspect it's because they are on different LAN addresses, so the NIC just does it's usual thing and transfers the traffic onto the LAN and then receives it back again. I don't think this would happen if there were two processes talking via the loopback address inside the NIC driver.

    PS Actually, I know that to be true, as I run the SMP Folding@Home client on my Mac, and that runs four concurrent threads, communicating with each other via the loopback adapter. They generate about 100 MBytes per sec of network traffic, none of which is visible on my router's traffic lights, and which has no discernible impact on my Mac's real network traffic.
     
    Last edited: Jun 25, 2007
  7. talmy

    talmy

    Messages:
    24
    OK. Looks like no compelling reason to change

    Since it ain't broke, I won't fix it. If I've got any performance loss for using a Microsoft protocol instead of a Unix protocol, I can't feel it.
     
  8. ajwans

    ajwans

    Messages:
    24
    I'm on a laptop so the address that I get for my Mac and for guest OS using
    bridged ethernet were constantly changing. With this in mind I setup host
    only networking specifically for sharing files and a separate virtual adapter
    for internet access from the guest OS.

    My posts on getting NFS working between the Mac and Linux have probably
    been moved to the archived forums with the recent forum update but the
    search function should reveal them (hint: search for "NFSManager")

    andy
     

Share This Page