I'm trying to connect my Raspberry Pi to my PC on eth1. On eth1 I have the following addresses:

auto eth1
iface eth1 inet static

Between PC and raspberry Pi I have a straight Ethernet cable, the lights from both Ethernet ports are on.

I tried nmap -sn but I only get address.

I tried arp -a I get no result.

I tried ping -b I get no result.

Here is the output of sudo netstat -rn:

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 eth0   U         0 0          0 eth0     U         0 0          0 eth1   U         0 0          0 eth1

At home, when I connect the cable between the Raspberry Pi and the LAN router port I can access via ssh without doing anything else.

I'm out of ideas, what can I do?

Thank you!

  • You do NOT have a static address see How do I set up networking/WiFi/Static IP Also is a poor choice as this is the gateway. If you left the settings the way they were you may be able to access via a link-local address (discussed in the link).
    – Milliways
    Mar 24, 2016 at 22:42

4 Answers 4


Try the following, it has worked for me every time.

Set a static IP for your LAN in the PC.

Your LAN-> Properties-> Internet Protocol Version(TCP/IPv4) -> Properties -> Use the following IP address

IP address  :
subnet mask :
Default gateway :

Set them as above.

Now connect your Raspberry Pi to the PC using a straight ethernet cable (no crossover cables are required). And power it on.

Use a network ip scanner such as advanced-ip-scanner to get the IP of your raspberry pi.(make sure the scan range is set to - ).


It seemed that the problem was that the power cable was too long and probably the electrical tension was too low because the cable acted like a resistor.

However it was weird because the LEDs were on.

  • Your answer makes no sense. What does the power cable has to do with Ethernet? Sep 12, 2016 at 9:58
  • Is seems like it has to do because if I connect the long cable, the Ethernet does not work although the LEDs on the board and the Ethernet port are ON and if I connect the short cable, the Ethernet connection works. The behaviour is systematic, this might not be the case for others, but it certainly worked for me. Sep 12, 2016 at 13:45
  • Does the long cable work at all? I.e. can you connect two PCs with it? Sep 12, 2016 at 13:48
  • No, I haven't done this test, but I tested several long USB cables and it was the same behaviour Sep 12, 2016 at 13:52

Is your cable store bought or did you make a CAT5 crossover cable. In a crossover cable, two of the wires are flipped. A router does this flipping for you. Unfortunately, plugging a standard store bought CAT5 cable into two different computers will not work.


  • 4
    According to this the Pi supports Auto-MDI-X (as do most current NICs in PCs) so there should be no need to use a crossed cable.
    – Ghanima
    Mar 24, 2016 at 21:30
  • 1
    This answer is wrong - see comment above. Mar 25, 2016 at 20:25
  • The PI supports Auto-MDI-X, but what about the computer he is connected to? Mar 26, 2016 at 21:30

When you plug in to the router, the router will (probably) be handing out an IP address and gateway details, DNS server details etc to the new client device, via DHCP.

If you're connecting directly, you'll need to manually configure both clients with static IP addresses within the same subnet. Something like:

Static IP of PC -
Static IP of Pi -

You should then be able to communicate/ping between the two devices.

When I've done this in the past, I've used a crossover cable rather than a normal Ethernet cable... but I'm guessing one or both of your devices have 'auto uplink detection' which is dealing with that for you.

  • So, if can't access the Raspberry Pi there is no way of getting this connection to work? Mar 24, 2016 at 12:08
  • 2
    OP is not using a router - he had cabled RPi directly into PC. Mar 25, 2016 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.