Can't ping local device, and can't change it's static IP
I have a Raspberry Pi, and wrote an iso to it which included the entire operating system. It is running Debian, and as far as I could tell, it doesn't have iptables, and I don't know if it has another firewall. When directly interfacing to the device with a keyboard/monitor, I could ping other devices on my network.
ping 192.168.1.200 > Code:
PING 192.168.1.200 (192.168.1.200) 56(84) bytes of data. service networking restart >> Code:
Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning). Code:
eth0 Link encap:Ethernet HWaddr b8:27:eb:77:55:11 /etc/network/interfaces Code:
auto lo Code:
nameserver 172.27.35.1 /etc/hosts Code:
127.0.0.1 localhost Next, I tried to change the static ip to 192.168.1.100, but now eth0 doesn't exist. The first time I restarted the network after making the changes, it responded with the following (might be slightly off as I had to take a picture of it and then OCR the picture) Code:
root@cbrisstudio:-O /etc/init.d/networking restart > aaa 2>&1 /etc/network/interfaces Code:
auto lo Code:
#nameserver 172.27.35.1 Code:
127.0.0.1 localhost Code:
lo Link encap:Local Loopback Why am I not be able to ping it using it's original 172.27.35.150? Why is eth0 available? Thanks |
ignoring pings?
One idea..(I read the post "diagonally" so sorry if I glossed over one or two details...) is that it ignores pings...or more precisely: does NOT respont to pings...
Try this (as root) on the device Code:
sysctl -w net.ipv4.icmp_echo_ignore_all=0 Melissa |
Thanks Melissa,
Tried both, but the second results in an error (command not found). If you see the ifconfig, there is no eth0, so I don't think it has anything to do with not pinging. Ah, let me go back to the original ip and try that command... EDIT. Nope, restored to the original 172.27.35.150 IP, and can't ping it. Where is that IP address defined on debian? I thought it was always on /etc/network/interfaces or /etc/hosts |
That IP is not defined anywhere on the RPi, it's coming from your DHCP server at 172.27.35.1.
Try getting rid of the network and broadcast lines in your static config, you only need address, netmask, and gateway. Then use "ifdown eth0" and "ifup eth0". You can also put the DNS servers in the interfaces file. This is the interfaces file on one of my RPis running Raspbian: Code:
$ cat /etc/network/interfaces |
oookay, what I try after a new set up it ping the machine tru the loopback (127.0.0.1) ansd see if the IP stack is okay...
So, after actually READING the post :P here's what worries me... per ifconfig on the device... Quote:
I doubt device 1 (192.168.1.5) could ping device 2 (127.16.1.1)... let's "sincronise" this first... Melissa |
Quote:
Tried your /etc/network/interfaces setup, and like my previous one, eth0 just doesn't exist anymore. I get this "hardware isn't capable of remote wakeup" error when restarting the network (see my edited original post). |
I can ping through it loopback.
Yes, you've identified my network type properly. I was concerned that device 1 (192.168.1.5) couldn't ping device 2 (127.16.1.1), so tried to change the IP, but that is failing. |
Quote:
Quote:
Quote:
What IP did you give device 2? I'd go for 192.168.1.6, just to try things... Melissa |
Quote:
That remote wakeup message is not an error, it's just a harmless notification that you get every time eth0 is brought up. I see you're redirecting all output of "/etc/init.d/networking restart" to a file, why is that? What are the contents of this file? If the network is not coming back up correctly, step one is to look at the output of this command to see why. |
You cannot ping because the interface is bound to a network but the gateway in the route table does not belong to that network. They don't belong to the same network. This commonly occurs when the router is not configured to bridge. You may try launch browser and access your router 192.168.1.1 and from there configure it On as bridge. Or you may try if fixing the interface into the internet gateway may work:
Code:
# route add default gw 172.27.35.1 eth0 Try to ping the gateway and any of your DNS. If it works, then good. Hope that helps. Goodluck. m.m. |
Quote:
|
Quote:
|
Quote:
Also, did you try "ifdown eth0" "ifup eth0" as I suggested earlier? |
Quote:
A good example Quote:
Melissa Edit - what is the IP address of your router/modem? |
Quote:
Code:
Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning). |
Quote:
I think the pi doesn't know the router IP. Is there a way to make ifconfig return this info? My router/modem (same thing as the gateway, right?) IP is 192.168.1.1. I can ping it from another server on my network. |
Looks like my gateway is set correctly, no? This is the Pi:
Code:
eth0 Link encap:Ethernet HWaddr b8:27:eb:77:55:11 Code:
[root@devserver ~]# ifconfig |
I feel like an idiot! My Pi was connected to my Ooma modem. Sorry for wasting your time.
|
Quote:
The times I tried to ping a local server only to find the switch at the local node is not turned on...trust me, this happens :) So...all working now? By the way... Quote:
Melissa |
Quote:
|
All times are GMT -5. The time now is 03:03 PM. |