1

I'm trying to connect my laptop to my Raspberry PI with just a LAN cable and without a router because I don't have one. So I just configured a static IP in both the devices and tried to setup a network between them. It appears that the network has been established but when I try to ping (to check whether they are able to communicate or not) my Windows laptop from the Raspberry PI then it is not able to ping but when I ping my Raspberry PI from laptop it pings successfully. My real problem is actually that I am not able to ssh from the laptop to the Raspberry PI through ethernet. The description about pinging I gave just because I thought it will be related to same problem because of which I cannot ssh from laptop to the Raspberry PI, and that the ping description may help you to find the solution to my problem.

Please help me to fix my problem, and be able to access my Raspberry from my laptop.

What kind of additional network detail and configuration should I provide you for the help?

  • 2
    This is really hard for some versions of Windows as Windows can fail an Ethernet network but not make that obvious to the user. That is, the connection may appear to be working but it is not. Also, you may need a cross over cable if not using a switch. In the end, routing problems can be difficult to solve. Especially in your case where you are not providing the responses to many common networking commands such as ifconfig, ipconfig, and route. – st2000 Dec 23 '17 at 3:45
  • 1
    As @st2000 points out you have given no details of the network set up on the Pi or the PC. How do you expect to get help? – joan Dec 23 '17 at 11:33
  • When there is no router or DHCP server, the Raspberry Pi will try to establish connection vi link-local addresses. There is generally no need to set an IP address for link-local connections. IPv4 link-local address space is the 169.254.0.0/16 subnet. – RubberStamp Dec 23 '17 at 22:52
  • so tell me what kind of network detAil should i provide you – sahil Dec 24 '17 at 2:30
0

If you are linking two Ethernet network connections on Host devices with a RJ45 twisted pair cable it MUST be a "cross-over" cable, so that the pair of wires that are outputs on one device are connected to the input ones on the other. As it happens, modern-day switches/routers/hubs can generally automatically swap the pairs of wires over as required, but in the past when they did not have that functionality there was often just one port that had a mechanical switch that did this manually and that port was reserved as a "uplink" port so that it could be wired to another switch or hub - so that one did not need a "cross-over" cable.

Anyhow neither a Laptop or a RPi has that reversal so it must be done in the cable before you can get them talking to each other.

  • when the ping is working (at leas one-way), the wiring is ok – andrej May 15 at 9:44
  • At least in that direction - I suppose we should not totally rule out a duff network lead - but swapping the connected ends in the situation that the OP describes will confirm it is such a faulty cable if the working ping changes to the other direction...! 8-P – SlySven May 17 at 22:29
  • when at least one way of ping works the cabling is ok, no need to swap cables – andrej May 18 at 20:45
  • 1
    I was going to suggest you were missing my point that if there is damage to one pair of wires in the lead (in an RJ45 network cable used purely for Ethernet {but NOT PoE} only four of the eight cores are actually used, as two differential pairs, one in each direction) then there could still be data flow in one direction but not the other - so unplugging the lead and reconnecting it the other way around will swap the send and receive wires over. However having research the ping utility I now realise it does require (and thus test) data flow in both directions after all! 8-O – SlySven May 18 at 21:08
0

When the ping is working downhill, the network HW and cabling is OK.

No uphill ping response may indicate that your windows machine does not reply to ping and/or that the windows firewall is blocking ping at all.

Regarding the ssh issue - are you sure your ssh server is running?

sudo systemctl enable ssh
sudo systemctl start ssh

Are you sure your firewall is permitting ssh packets (port 22) to enter the machine? Maybe you could disable your firewall at all for a while.

sudo systemctl stop ufw
sudo systemctl stop gufw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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