I'm looking for a way to directly connect my Windows 7 laptop and my headless Ubuntu 10.04 server. (Desktop edition is installed, for my own reasons.) I have a regular Ethernet cable. My problem is that I keep trying to use Windows Backup to a shared folder on Ubuntu, but the wifi connection keeps dropping intermittently for all my devices at the same time before the backup completes. I want to use the cable to connect the two computers directly, independent of whether or not they're connected to wifi. This will create a much more reliable connection, and it will allow the backup to complete without worrying about the wifi dropping.
It would be best if I could create this connection using an ad-hoc network (or similar) on Windows 7 without touching the configuration on the Ubuntu server, as the server has no input devices or displays connected to it. I mostly access it through SSH and sometimes VNC, and if the connection is lost, the only thing I can do to get it back is a hard reboot.
So the current configuration is this:
Windows 7-------wireless-----\
\
Wifi router
/
Ubuntu 10.04----wireless-----/
But I want it to be like this:
Windows 7-------wireless-----\
| \
|cable Wifi router
| /
Ubuntu 10.04----wireless-----/
Answer
Actually, I did some more poking around and found some answers myself, and it's really easy. There are two ways to do it: share the connection from Windows to Ubuntu, or from Ubuntu to Windows. Importantly, only one of these will work at a time, but doing both won't break anything. It just won't share the connection until you reverse one of them.
Windows 7 as the host
To share a wifi connection over ethernet directly to another computer from Windows 7:
- Open Network and Sharing Center.
- Right click Wireless Network Connection, click Properties.
- Click on the Sharing tab.
- Check the box next to "Allow other network users to connect through this computer's Internet connection."
- Click OK.
- Plug the Ethernet cable into both computers.
Ubuntu 10.04 as the host
To share a wifi connection over ethernet directly to another computer from Ubuntu 10.04:
- Right click on the Network Manager applet, click Edit Connections...
- In the Wired tab, click Auto eth0, then click Edit...
- In the IPv4 Settings tab, change Method: to Shared to other computers.
- Click Apply and enter your password when it asks you.
- Close everything and reboot.
- Plug the Ethernet cable into both computers.
Now both computers should have IP addresses different from those assigned by the wireless router, regardless of whether the host computer is connected to wifi. The host computer should have an IP address ending in .1, and the guest computer should have an automatically assigned address.
No comments:
Post a Comment