Hello everyone, I am newbie on this platform I am sorry if I am in a wrong place to ask this. I have a raspberry pi server that node red is running on and a client/arduino. I set static ip in raspberry I wrote only ipv4 ip and router ip( for example 162.27.200.45 and 162.27.200.1 ) the rest automatically filled up. I connect 3 device (server, client and my windows pc) into switch. I set 162.27.200.50 ip on my windows pc, I cannot connect my server via my computer I tried send ping to server, didnt respond but I can reach my client through ping. When I use router in place of switch, there is no problem with connection. What might be the problem ? Why i cannot reach raspberry pi through ip altough I am in the same ip block ?
You may need to elaborate on the IP numbers a bit more.
- What is the RasPie's IP
- What is the Subnet mask
How are you trying to connect to the server? Server as in: RasPi and Node-Red?
To connect to see Node-Red on the RasPie, you need to enter:
<ip address>:1880
in the URL of the browser.
That may be all you need, so maybe try the last part first and the first part last if that doesn't work.
Raspberry pi ip : 162.17.200.22 / subnetmask: 255.255.0.0 / gateway : 162.17.200.1
My windows pc : 162.17.200.24 / subnetmask: 255.255.0.0 / gateway : 162.17.200.1
aduino ip : 162.17.200.23 subnetmask: 255.255.0.0 / gateway : 162.17.200.1
When I send ping to raspberry from my PC in comnand window using switch
Request timed out.
Request timed out.
Request timed out.
Request timed out.
when I use router I send ping to raspberry from pc
Reply from 162.17.200.23: bytes=32 time<1ms TTL=128
Reply from 162.17.200.23: bytes=32 time<1ms TTL=128
Reply from 162.17.200.23: bytes=32 time<1ms TTL=128
Reply from 162.17.200.23: bytes=32 time<1ms TTL=128
Ping statistics for 172.17.60.25:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Why I use 255.255.0.0 ? Actually I didnt pay attention to that, later I changed it but nothing changed
Gateway ip address is 162.17.200.1 for all the devices.
ı dont know what kind of router I use. Everest brand one of the cheap ones
Dumb question:
Why do you have subnet masks of 255.255.0.0
and not the usual 255.255.255.0
?
What kind of router do you have?
Oh, another question: What are the gateway
IP addresses in the devices?
Sorry.
Could you clarify what is happening with the switch
and what is happening with the router
.
The way it is written is not clear.
Say what happens with the switch
connected (NO ROUTER) and pinging between RasPi and PC.
Then what happens with the router
.
PING only for now.
Oh, P.S.
As you are a newbie you will be limited to how many posts you can do.
I would suggest you post your reply to my PING
question and then stop posting new
posts. EDIT the reply you will be posting in answer to the PING
question/s.
This is not a correct range within a LAN, it is a public ip while you should use private ip’s in a LAN (it will technically work but can cause conflicts, also on the internet). How did you get these addresses?
Can you ping the PC from the Pi?
Can you access the Arduino from the PC and the Pi?
I tried now I cannot reach from pi to pc or vice versa. There is no problem with arduino now I can reach arduino.
It might be out of range but still it should be able to reach like in arduino.
Edit : In advanced ip scanner program on pc, I can see my raspberry device but still no connection
Can you reach the Arduino from both the pi and the pc?
What else is connected to the switch and what IP addresses do they have?
I can reach from pc but not from raspberry.
Apart from these 3 device, there is no another device
So you can reach the arduino from the pc but the pi is not accessible and cannot talk to anything. Therefore you have a fundamental problem of some sort with the Pi or its connection. On the pi what do you see if your run
ifconfig
or if that command is not found then
ip addr
Also show us the output on the pc of pinging the Arduino.
I think Lets put arduino aside for now and focus on rpi connection.
I see all the values I set as I configured before.
inet 162.17.200.22 netmask 255.255.255.0 broadcast 162.17.200.255 on raspberry side
Pinging arduino respond in miliseconds
What exactly do you see for the Arduino ping? We can't put it aside as it works. There must be a difference somewhere.
I presume you can't do a screenshot or copy/paste of the Pi ifconfig output as it doesn't have a network connection, can you take a photo of it?
I cannot do it right know I am away from my home. I basically want to learn why I cannot reach my RPi without using router. When I use router there is no problem at all and then I remove all ethernet cables and plug them into switch, I cannot reach anymore. Do I need to use router every time I want to reach rpi ?
Hi
You seem to be using very unusual IP addresses on your devices - as @bakman2 said - 162. addresses are real internet addresses not normally used on LANs
LANs use addresses starting 192.168 or 10. or 172.16. (See https://en.wikipedia.org/wiki/Private_network)
So "normally" a home device gets an IP address from a router (most commonly starting 192.168) so the first thing I'd do would be to reset your PC and your Pi back to using DHCP and see what addresses they end up with.
If you could do that and report back that would help out a lot as it would give us a base line to work with
I don't know, provide the asked for information and it may be possible to determine the reason.
None of this is anything to do with node-red of course.
As others have said it would also be better to give your devices conventional ip addresses
Another thing which hasn't been addressed:
Is Node-Red running on the rpi?
It may be installed, but is it running?
Is the rpi set up for SSH?
I feel a lot of the problem/s could be that if NR isn't running, the page (understandably) won't load. And if it isn't set up to accept SSH connections it is going to be a real problem seeing its configuration.
Question to @RednodeNewbie:
You haven't clarified what happens if you have a switch
between the devices and what happens with the router
.
In which configuration can they all be pinged from the PC?
My suspicion is that the router
is not routing the stuff locally.
Where as if it is only a switch
(and works) it is because it is sending the requests out on all ports (at this stage) and is getting a reply.
You also need to qualify:
Is it a managed
switch, or a non-managed
switch.
And when using it: Is there an uplink else where?
(This information is also handy when using the router
)
If he puts the router into the network it will probably route all traffic out to the internet using the ip's he's provided because the router would think that's where the ip's are. That is unless he jiggered with the routing table and I would assume he hasn't done that if he's asking the questions he's asked. Using a subnet of 255.255.0.0 wouldn't cause his pings to fail in a normal situation it would just open up his network to a whole lot more ip addresses. If he has a switch or even a hub the first thing to do would be to hard wire all the devices into it. (hub or switch) assign the ip's and try to ping. At that point if it doesn't respond you have a bad hub/switch, bad cable, bad network card or misconfigured ip addresses. As long as there is no router in the network he could use any address range he wanted. Assuming they are all in the same subnet.
Honestly, I'm not sure.
The subnet mask and the default gateway as shown shouldn't work.
Because the address for the gateway is in the wrong range. Though I guess you can set the gateway at what ever address you want.
I agree the pings (etc) may be getting sent up stream if the router is used.
But he hasn't really clarified that part.