If you're connecting the same cable to both computers, then you probably need a crossover cable, a special kind of ethernet cable. It looks just like regular cables, but the connections on one end are reversed.
It might be a good idea to pick up a cheap network switch. Then you can use regular ethernet cables.