Actually, you do not use a hub in any case. Hubs were used in an old technology of networking called Arcnet but that hasn't been used in about 20 years. What you have in the modern network is properly referred to as a switch and it has a very different purpose than a hub but that is not germane to your question, so I will digress no longer.
No, you do not need to use a switch to get two computers to talk to each other. What you can do, as Rtrahan stated, is use what is often called a crossover (or more properly cross-connect) cable. What it does is reverse the two pairs of wires so that what is the receive pair on one end is the transmit pair on the other end. In an Ethernet cable, only four wires are used: pins 1, 2, 3, and 6. with 1 and 2 being one pair and 3 and 6 being the other. The order is counted from left to right as the flat side of the plug (the side without the retaining clip) is facing you. To make a cross-connect cable, you switch pins 1 and 3 and then 2 and 6 on one end of the cable. Once you have done that, though, there is still more to do.
Now that you have them connected so that there is no longer any sort of other device between the two, you need to tell them how to address each other. The easiest way to do this, since there is no DHCP server involved due to the two machines being directly linked to one another, is to give them both a static IP address. Presuming that you are using Windows 7, you would accomplish this by going into the Network and Sharing Center control panel applet, clicking on the blue phrase "Local area connection," and then clicking on the Properties button toward the bottom of the window that appears. Once you have done that, another window appears and you should see a selection for "internet Protocol Version 4 (TCP/IPv4)." Double-click on that and another window will appear. In here, you will be able to set the IP address, subnet mask, and default gateway. For your purposes and since you are not connected to anything else, I would recommend just setting the IP address and subnet mask. You can make the addresses whatever you want provided that the two machines are within the same IP subnet. So, for example, if you want to set 10.0.0.157 for one IP address and the other as 10.0.3.201, then you would need to set your subnet mask to 255.255.252.0 If it was set to 255.255.255.0, then the two machines would be in separate subnets and not be able to talk to each other without a router.
I hope this helps. If you need any further assistance or if something is just about as clear as mud, feel free to drop me a line and I'll see what I can do to help you.
A hub or switch must be used to connect 3 PCs together. Two PCs can be connected using a single crossover cable.
I have a PC, laptop and xbox running and i have a modem and router downstairs with a wire leading upstairs then a netgear high speed hub splitting my connection 3 ways to my PC etc , but i don't think u need a hub if your router has multiple ethernet slots.
If you don't have at least two wireless adapters for your pcs, yes you have to have a network cable in order to connect two pcs.
A Crossover Cable is used to connect 2 PCs (when a hub or switch is not used) to make the simplest network of all. (6th Edition, Page 852)
Yes and no. If you want to just directly connect the two pc's together a cross-over Ethernet cable can do this. Cross-over cables are used to connect 2 like devices. Doing this will most likely require you to disconnect from the internet, unless your computer has 2 NIC's (ethernet ports) If you want to connect both computers together AND still have internet access a hub, or switch, or router is needed. Thus creating your own LAN
forget that and use a HUB/Switch or wireless router
A switch or hub is used to connect multiple devices to a modem. Hubs have largely fallen out of use due to their bandwidth-sharing properties that make them undesirable in high-speed local networks.
wireless
A router or possibly a data switch can connect two PC's to a DSL or cable modem.
Either use a crossover cable or connect them using a hub, switch, or router.
switch,hub.
A Hub or a Switch