Sunday, January 2, 2011

Ad-hoc Connection Between PC and Mac with Internet Access

I am always a PC user until I bought myself a pre-own MacBook Pro some months ago. I don't call myself a total shift from PC to Mac as my main working station is still my Dell computer which run under Windows 7. I do, however, found out that both Windows 7 and Mac Os X has lots of similarities that I have no difficulties switching between my PC and my Mac.

I used to run a virtual router on my old XP desktop computer which I could create an internet shared WiFi hotspot in my home with a Asus WiFi adaptor. The virtual program come together with the adaptor. Some clicks away, and my old XP desktop computer could turn into a WiFi hotspot. With this setting, I could have internet access for both of my desktop and laptop computer.

However, after I upgraded to Windows 7, the virtual router program no longer useable as that program is designed for Windows XP. The reason why is not known; I've tried to install the program, but the program just couldn't run. This drop me to the idea of direct computer connection via ad-hoc connection.

Back then when I was a PC user, my mind was set at that PC and Mac would not communicate in a direct or in-direct way. I didn't know that to connect both PC and Mac through ad-hoc connection is possible. Even with some settings on PC and Mac would make an ad-hoc connection with internet access for both PC and Mac is possible.

I am using Celcom internet broadband service with my PC as my main computer. My PC, which is a Dell computer would be connected to Celcom broadband, and my Mac would access to internet via ad-hoc connection through my desktop PC. And I will show you how to set up an ac-hoc connection with internet access between a PC and a Mac.

Preparation

This is my Asus Wifi adaptor. This adaptor would be plugged onto my PC as my WiFi transmitter. My Mac has its own AirPort as its WiFi receiver. Once the adaptor is plugged onto the computer, Windows 7 will set it up automatically. A wireless network connection will be created under my computer's network connections.

Network Setting Up

On my PC, I will set up a private network by bringing up the network windows as shown below:

Double click on "Set up a new connection or network". Under "Choose a connection option", select "Set up a wireless ad hoc (computer-to-computer) network" and click "Next".

One friendly explanation what is an ad-hoc connection is all about will be shown. Read it, or skip it by clicking "Next".

In the next windows, the name of the ad-hoc network shall be named, and a password to be assigned for this network. In this example, select security type as "WEP" and I've named my network as "ExampleAdHoc". Give any name to your liking. A password has assigned to it. Check "Save this network" as well before click "Next".


If everything has done correctly, the next window will inform you that the network you have just created is ready to use.

To check if the network that has been created just now is ready to use, simply double click onto the wireless signal icon on the bottom right taskbar. A pop up windows will shown all wireless network that is available.

A "Waiting for users" prompt indicates that the network is ready to use, and waiting for any computer that want to connect with it.

Proxies

The next step is to set up the proxies for the PC. This step is important as proxies will ensure that all computers within the same network would have a fix IP address and made internet access for other computers within the network possible.

To set the PC's IP address, simply double click "Change adapter settings" that is located on the left hand side of the "Network and Sharing Center" window. A windows of "Network Connections" will be brought up as shown :



Right click on the "Wireless Network Connection" (in my case, "Wireless Network Connection 2"), and select "Properties", under "Networking" tab, select "Internet Protocol Version 4 (TCP/IPv4)", and click on "Properties" button.

Check "Use the following IP address:", and key in the IP addresses as shown:



Leave the "Default gateway" and "DNS severs" blank, click "Ok" and you are done with the proxies.

The next step is to share the internet connection via this wireless network that been created. This can be done by sharing the internet connection with the broadband services that is connected to my PC. I am using Celcom broadband service, hence what I did was under "Network Connections", left click the "Celcom" icon, choose properties, select "Sharing" tab, and check "Allow other network users to connect through this computer's Internet connection". Select the "Home networking connection" by choosing "Wireless Network Connection" as shown:



Click "OK" and you are done with my PC. My PC now is ready to be connected as a router for other computers as well.

Setting on Mac

Since my Mac would share the internet connection via PC, hence what I should do is to assign an IP address to my Mac and to assign the router IP address, which is my PC's IP address into my Mac's network setting.

To start, simply select the "System Preferences", and select "Network" under "Internet & Wireless" section.


Under the Network window, select "Advanced..."

Select "TCP/IP" tab, under "Configure IPv4", select "Manually" and key in the IP addresses as shown below:

Click "OK", and click "Apply", and you are done !

Turn on your AirPort, and you should be able to find your network name under "Devices". Select and join the network that you've created, key in the password, and walla, you are ready to surf the internet from your Mac.


10 comments:

john said...
This comment has been removed by the author.
Anonymous said...

Great tip.
worked for me the first time (win7 ultimate 32bit having 3g and a mac pro with os x 10.6.3)
After rebooting i got an error under win 7 saying the static ip is there twice.
Any ideas how to fix this?
Thx.

Anonymous said...

I don't understand the benefits of doing this. If you have a pc and a Mac with a wireless connection, why would you need to connect the Mac through the pc. Just turn airport on and connect to the Internet.
I looked this up in hopes to find a way to transmit data from a Mac to a pc through a wireless connection without using internet services. Does anyone know if that's possible? An ad hoc between Mac and pc without using Internet. Why should this be so difficult. If you connect to computers using q crossover cable it's basically the same thing no?

Anonymous said...

Hi. After setting up a network, how do I view Mac files from the PC. My goal is to transfer over music and other files from my old mac to my new PC. I can't figure out how to see the Mac files from the PC. I'm new at Windows 7. Thanks.

jayden said...

thank you for this great tutorial, it was even fun reading it, and you know why? because it was written clearly and easy to understand, this is how online-tutorials should be! do i have to mention, that the described method worked instantly?! greatings from germany...

Helga (spjelgus@gmail.com) said...

Thank you for this tutorial! I really need to set this up for my MacBook but for some reason after everything I've tried my mac still has no connection... I can connect to the ad-hoc network but get an unable to connect to the internet message every time. Any ideas?

peter said...

The tutorial is very clear and well done. But I have the same issue as Helga above. I am not able to access the internet in the mac. (PC: windows 7 / MAC: os lion)

peter said...

More details... My PC is getting internet through a wired LAN... and my MAC is trying to connect to the PC's wireless adapter... So maybe what i am trying to do (share a wired connection wirelessly) is not possible this way, using ICS... Any clue?

Joshua said...

Do You require a USB adapter to do this proceedure?
Because I have a "Netgear" modem which runs with WEP security and I can't connect with my Mac.

Please Answer as soon as possible...

MBP said...

Thank you so muuch!!
i have an assignment to do and this article really help me a lot! i know what to do now!
I understand it perfectly! thanks!