0

First of all I read a lot of thread about problems with connections but all referred to a Wi-Fi LAN adapter. My problem is on the eth0 LAN port.

I have a Raspberry Pi 2 Model B with the latest stable Raspbian installed. I use it as a DHCP server so I configured a static IP. The problem is: after a reboot, the LAN port seems disabled. No ping, ssh or VNC work. But if I connect via real VNC over the cloud I can access the RPi and immediately after connected eth0 starts and i can ping or access ssh.

It seems the LAN port wakes up after an external input.

But after some minutes after disconnect from VNC again the LAN port goes to sleep.

This is my /etc/network/interfaces:

iface eth0 inet static
        address 192.168.3.91
        netmask 255.255.255.0
        broadcast 192.168.3.255
        network 192.168.3.0
        mtu 1500
        gateway 192.168.3.1

And this is my /etc/dhcpcd.conf:

interface eth0
static ip_address=192.168.3.91
static routers=192.168.3.1
static domain_name_servers=208.67.222.222 208.67.220.220
static domain_search=

I tried with

  • auto eth0
  • inet manual (instead static)
  • using a script executed on boot with sudo ifup eth0

but nothing worked...

On boot, the LAN port is not responding to pings.

Aurora0001
  • 6,308
  • 3
  • 23
  • 38
  • 1
    I don't know anything about your network but this looks like an issue with arp reply. Connecting from the cloud (what ever this is) your pc get an arp reply from the pi 2 so the pc knows its mac address and stores it the arp cache. Without refresh the entry will be deleted after 300 sec by default. If you connect through your local network where arp reply does not work connection will work for max. 300 sec (without refresh from cloud connection). Mabye ... Is there any firewall? – Ingo Apr 21 '18 at 11:09
  • 1
    You don't identify what OS exactly but do you think your problem might have something to do with ignoring the warning **# Please note that this file is written to be used with dhcpcd

    For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'** Unless you specify what you did no one can tell. Also your dhcpcd settings are wrong.

    – Milliways Apr 21 '18 at 11:13
  • @Ingo: no firewall – Simone Bissi Apr 21 '18 at 14:41
  • @Milliways: I followed tuts like this [https://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-networking-wifi-static-ip-address/74428#74428] where I can use both interfaces or dhcpcd.conf but still same problem. Connection goes up and down without reason. – Simone Bissi Apr 21 '18 at 14:43
  • Could it be problem with power supply? I'm using a phone charger with 5.0V and 550mA. – Simone Bissi Apr 21 '18 at 14:45
  • can you give us the output of these commands when you are connected to the network? Edit your question and add them. 1 ip link show 2 ip addr show and 3 ip route show – eftshift0 Apr 22 '18 at 00:38
  • The Problem is you DID NOT follow tuts like this [raspberrypi.stackexchange.com/questions/37920/… the settings are WRONG and you have to use one OR the other, although the best practice would be to use neither. Neither addresses a DHCP server, and your question does NOT explain how/why you are using a DHCP server – Milliways Apr 22 '18 at 04:30
  • @Milliways I restarted from 0 and read the tut. so I used only 1 method (dhcpcd) but same result. I have also reinstalled totally raspbian before it. I'm using a DHCP server bacause the one on the router is not so good. – Simone Bissi Apr 22 '18 at 06:46
  • @eftshift0 here you are (the pi IP is 34.91): https://pastebin.com/eNiFQf6J – Simone Bissi Apr 22 '18 at 06:48
  • Setting up a DHCP server (which you have not mentioned in your question) is a TOTALLY different process from setting a client static IP address (which is what the tutorial describes). Your question is unclear about what you are trying to achieve, or the topology of your network. It is INADVISABLE to have a network with multiple DHCP servers (even if one is "not so good" - whatever that means). – Milliways Apr 22 '18 at 07:05
  • I'm terrible sorry @Milliways if I was unclear. I should do experience in forum requesting :-D . Anyway i need to setup static ip address because i want to use raspberry as DHCP server. The OS installed is the last one Stretch downloaded yesterday from official website. After install I did apt-get update and upgrade and then rpi-update. The network is a normal home network with 1 router and some clients like computers or phones or console. I know it is better having only 1 dhcp server in my network. Infact i disabled the the DHCP server from router. – Simone Bissi Apr 22 '18 at 07:14
  • @Milliways does is-dhcp-server works with dhcpcd.conf method? – Simone Bissi Apr 22 '18 at 12:54

1 Answers1

0

Solved the problem. My RPi was setted up correctly. The real problem was on LAN. There was another linux router with some network services still active that make conflicts with RPi. I supposed i stopped all network services on that machine but i was wrong. Without that machine on LAN, RPi working perfectly. Thanks to all for help.