also @ TechSpot: Android 4.0: Tracking Ice Cream Sandwich's Availability on Smartphones

TechSpot

Networking a Mac and a PC both wirelessly and wired! *****s guide required.

Discussion in 'Storage and Networking' started by rednek, Jan 3, 2011.

  1. rednek Newcomer, in training

    Hi

    I'm running a music studio with a PC (Win XP Home) and a MacBookPro (Snow Leopard).

    What I'd like to be able to do is the following:
    Have the PC and the MBP access the internet via their wireless connections (yup, I know, easy - done in fact),
    but also....
    Have the MBP and the PC talk to EACHOTHER via a wired connection: both machines have gigabit ethernet, and the mac, i'm told, will do the crossover automatically (ie negating the need for a crossover ethernet cable). I'd like to be able to transfer sets of large audio files from one machine to the other which, via wifi, takes forever; but I'd also like to have both machines access the internet independently of each other.

    I'm kind of asking if this is, in fact possible and, if so, how to do it.

    Also, what would be useful is to be able to run Synergy on both machines, so I can use the keyboard and mouse of the PC to operate both machines. This was easy when I had a PC laptop, but now I've switched to the mac, its all a bit different.

    Any help, suggestions, advice is, as always, extremely welcome.

    Kind Regards

    Red
  2. jobeard TechSpot Ambassador

    MBP?? What do you refer to?

    I have Win/XP, a Mac OSX, and RedHat linux all sharing files on the same subnet.
    Just connect (anyway you like to the router) and enable Print/File Sharing on all system.

    Google File Sharing Mac and PC to get the setup
    here's one example
  3. rednek Newcomer, in training

    Hi JB,
    Many thanks for the quick response! MBP=mac book pro.
    Apologies for the ignorance, but will the method you suggest facilitate file sharing via ethernet only, and access to the internet via wifi only? This is what I need to be able to do.
    Kind Regards
    Red
  4. jobeard TechSpot Ambassador

    hmm; You want any system wired to the router to enable file sharing
    but at the same time, ONLY WiFi connections to have Internet access? very unique setup and could be complex to achieve.
    Before we launch off into left field, what is the concept you're attempting to implement; protect files from Internet access?
  5. rednek Newcomer, in training

    Correct. I have no wired internet access in the music studio, but can access the wifi in the house (next to the studio). Wifi will enable me to transfer files between the mac an PC, but it is so slow compared to gigabit ethernet and makes the transferring of large sets of audio files very time consuming.

    I could always switch off the wifi on one of the boxes and switch the ethernet port on I can get the fast transfer speeds, but it would be more convenient I didn't have to climb behind my rig every time I need to transfer a file.
  6. jobeard TechSpot Ambassador

    Let me show you the normal setup and then discuss it:

    The typical in-home LAN looks like
    Code:
    modem==router-----wired.systems
              |
              +- - (wireless) - - -  if so equipped - - other.systems
    
    File Sharing can be enabled on systems safely AS LONG AS
    you never port forward 137-139, 445

    Using various features of routers+firewalls, you can inhibit any unknown
    systems from accessing your router and/or at least deny file sharing to them.

    The above works well - - so why restrict wireless differently than wired? Can't you use this setup? If not, please clarify why not.
  7. SNGX1275 TechSpot Special Forces

    I think there might be some confusion. Here is how I see what rednek is saying:
    The problem is he doesn't have wired internet access, only wireless. He can share over wireless, but even Wireless N speeds suck compared to gigabit. He can achieve gigabit wired - without a router connecting them, by just using a regular cat-5 cable. He wants to share between the comps this way rather than wireless. So he is using a router, but wants that for wireless internet connectivity only.

    Its like, I have 2 laptops on the same table upstairs, wireless router is downstairs so I can't easily run a wire from each to the router. I can share files between them, but it has to travel over the air, which is slow compared to over a wire. So it would be ideal if I had a short cat-5 cable to just plug into each's ethernet port and send files that way.
  8. rednek Newcomer, in training

    Exactly right. Its the speed at which I can transfer the files between the two computers which will make the real difference.
  9. rednek Newcomer, in training

    I need both PC and Mac able to access the internet independently if each other, as I cannot access the modem/router with cable, only wireless - its in a different part of the building and I'm not able to install a CAT5 network through the house. Also, even if I could, my router is only 100mb, and I could really use the speed of a gigabit connection.
  10. Leeky PC Arsonist & Moderator

    So you want to connect both computers via Ethernet and take advantage of gigabit speed?

    I presume you can connect via wire though, because your above statement makes it sound like running cable in your house can't be done?
  11. rednek Newcomer, in training

    Yup, the mac and the pc spend a lot of the time in the same room, ie, when I'm working on music projects. And this is when I'd need the gigabit speed. However, the modem/router is not in this room, its in the main house and I can't run a cable to where it is., so have to access the internet via a wireless connection. Even if I could I'd still only get 100mb unless I bought a gigabit switch.

    I don't need a crossover cable, as the mac auto-detects, which is useful.
  12. jobeard TechSpot Ambassador

    I was only attempting to the the O.P. to see the simpilicity of using the router itself.

    Of course the alternative is
    Code:
    Modem===Router - - wifi - - system#1--wired---system#2
    You need to emable Internet Connection Sharing on the PC which will cause the
    NIC attached to the cable to have an forced address of 192.168.0.1 (gee thanks MS.) and the other side will be 192.168.0.2
    This then requires that your router not have these addresses and you will need to configure it
    for something like 192.168.1.1.

    The downside of this arrangement is system#1 must be running if system#2 is to have Internet access.

    There's a complicated alternative
    Code:
    Modem===Router - - wifi - - system#1--wired---system#2
                 |                                   ^
                 V                                   |
                 + - - - - - - - - - - - - - - - - - +
    
    but I have to jump off for a job - - I'll explain tonight
  13. rednek Newcomer, in training

    Its this second option which would be of most interest. Many thanks JB; hope the job goes well, and look forward to hearing from you soon.
  14. jobeard TechSpot Ambassador

    yea, I guessed as much :)

    Ok; everyone knows this part; just two wifi connections and both have Internet Service
    Code:
    Modem===Router - - wifi - - system#1        system#2
                 |                                   ^
                 V                                   |
                 + - - - - - - - - - - - - - - - - - +
    
    With both systems running and connected to the router, you should be able to ping
    on system#1; ping system#2's address
    on system#2; ping system#1's address


    here's the tricky addition
    Code:
    Modem===Router - - wifi - - [B]system#1---wired---system#2[/B]
                 |                                   ^
                 V                                   |
                 + - - - - - - - - - - - - - - - - - +
    Both wifi settings system#1 & #2 need the Gateway address to be that of the router. This you alread have if both have Internet Service.

    All the wired stuff will need static assignments on both sides. I'll refer to the new setup for wired as System#x Nic2
    (implying the wired connection. leave all wifi settings as-as).

    I also assume your router is at 192.168.0.1 (correct me as needed)

    First get the WiFi settings from system#1 using ipconfig /all and report
    • IP Address. . . . . . . . . . . . . : 192.168.0.4
    • Subnet Mask . . . . . . . . . . . : 255.255.255.0
    • Default Gateway . . . . . . . . . : 192.168.0.1
    • DHCP Server . . . . . . . . . . . : 192.168.0.1
    • DNS Servers . . . . . . . . . . . . : 8.8.8.8

    the above are used to seed the static settings.

    For now, focus on the config, not the how-to

    we config system#1 Nic#2 like
    • IP Address. . . . . . . . . . . . . : 192.168.11.2
    • Subnet Mask . . . . . . . . . . . : 255.255.255.0
    • Default Gateway . . . . . . . . . : 192.168.11.4
    • DHCP Server . . . . . . . . . . . : 192.168.0.1
    • DNS Servers . . . . . . . . . . . . : 8.8.8.8

    we config system#2 Nic#2 like
    • IP Address. . . . . . . . . . . . . : 192.168.11.4
    • Subnet Mask . . . . . . . . . . . : 255.255.255.0
    • Default Gateway . . . . . . . . . : 192.168.11.2
    • DHCP Server . . . . . . . . . . . : 192.168.0.1
    • DNS Servers . . . . . . . . . . . . : 8.8.8.8
    Notice the IP of one system is the gateway address in the other system.

    to make sharing much easier, let's call system#1 Mickey and system#2 Donald
    We add Mickey and Donald to the top of the
    \windows\system32\drivers\etc\hosts file like
    Code:
    # this one will already exist
    [COLOR="Gray"]127.0.0.1     localhost[/COLOR]
    ## you add these two
    [COLOR="Teal"]192.168.11.2  mickey[/color]
    [COLOR="Red"]192.168.11.4   donald[/color]
    
    Obviously you can use anything you like other than mickey and donald :)

    to get the updated hosts file to be used, we need to bounce (stop/restart) like this
    net stop "dns client"
    net start "dns client"
    and the quotes are required.

    you should NOW be able to ping
    Code:
    on system#1;  ping system#2's address
       also ping donald
    on system#2;  ping system#1's address
       also ping mickey
    Once you can pind donald & mickey then \\donald\sharedDocs and \\mickey\\shareDocs will work.

    DO NOT USE INTERNET CONNECTION SHARING! this will just mess up the whole thing.
    Whatever firewall you are using, you enable Print/File Sharing on both systems.
    If necessary, you can manually configure network access
    Code:
    allow  in    tcp/udp  src-ip 192.168.11.* input-ports 137-139+445
    allow  out   tcp/udp  dst-ip 192.168.11.* output-ports 137-139+445
    Whew! let's see how you stand on just understanding the above concepts - - - -
  15. rednek Newcomer, in training

    Hi JB

    Many thanks for this. It WORKS!!!!! Lovely fast file transfer between mac and pc in the studio, and independent internet access. Top man!

    HOWEVER!!!

    The internet access only works on either machine when the ethernet cable is unplugged, ie, when there is no physical connection between the two machines. Its like as soon as you connect them via ethernet, they both look to that port for internet access, over-riding the wireless connection.

    I can easily just unplug the cable and have internet access immediately restored, but this is a little inelegant. It would be nice to be able to go on the net whilst waiting for files to transfer, for example.

    Would you know of a solution to this?

    Kind Regards

    Red
  16. jobeard TechSpot Ambassador

    Good Job Red :wave:
    I'll have to think about it ; get me some data please.

    connect everything and on Donald (system#2) run this

    ipconfig /all >sys2Tcp.txt
    netstat -r >sys2Routes.txt
    attach both to your follow-up
  17. rednek Newcomer, in training

    system 2 (Donald) is a mac. Would you happen to know similar commands for the terminal console?
  18. jobeard TechSpot Ambassador

    I'll look it up, but substitute System#1 - - it's just as good
  19. jobeard TechSpot Ambassador

    fyi: for future use:

    Applications->Utilities->Launch Terminal
    (this is the Mac/FreeBSD interface aka xterm and ~like Windows Command Prompt)

    the command comparisons are
    Code:
    Windows      ->  Mac Equiv
    netstat -r       netstat -r
    ipconfig /all    ifconfig
    Not in the above cases, but sometimes you need root access.
    To do that, enter su with no parms and then enter the root password
    You can google for How to enable Root on OSX and if you do, be sure to give it a
    new password (and record it!)
  20. rednek Newcomer, in training

    Hi JB
    system 1 attached.
    Red

    Attached Files: