If you need to connect two computers but you don't have access to a network and can't set up an ad hoc network, you can use an Ethernet crossover cable to create a direct cable connection.
Generally speaking, a crossover cable is constructed by reversing (or crossing over) the order of the wires inside so that it can connect two computers directly. A crossover cable looks almost exactly like a regular Ethernet cable (a straight-through cable), so make sure you have a crossover cable before following these steps.
Before buying a crossover cable, check your network adapter. Some newer network adapters automatically cross over when they detect that they're connected directly to another network adapter using a regular Ethernet cable.
To connect two computers with a crossover cable
This works best if both computers are running this version of the same Windows version (Vista, Win7, Win8, etc.)
- 1.Plug each end of the crossover cable into a network port on the back of each computer.
On one of the computers that's running this version of Windows, do the following:
Open Network and Sharing Center by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type network, and then click Network and Sharing Center.
In the network map at the top of Network and Sharing Center, double-click the Unidentified network icon. (If you have more than one network, this icon will be labeled Multiple networks.)
If network discovery and file sharing are turned off, in Network, click the information bar containing the following message: "Network discovery and file sharing are turned off. Network computers and devices are not visible. Click to change...," and then click Turn on network discovery and file sharing. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
Note
For Gigabit Ethernet or token ring networks, you will need a slightly different kind of crossover cable. For more information, contact a cable manufacturer.
source