How are you trying to connect the two? If directly by ethernet cable (device-to-device rather than via a router), you may need to use a crossover ethernet cable.
A standard cable connects the "send" pins in the PC to the "receive" pins in the router and vice versa. When connecting two computers directly, it would connect "send" pins to send pins and "receive" pins to receive pins so it doesn't work. A crossover cable swaps over some pins so that a direct PC to PC connection does work. You will, of course also need to ensure the IP addressing is correctly set up between the devices.