network problem Topic is solved
network problem
If I reboot DietPi the ethernet connection does not work all of the time. When I go to the network settings it says that ethernet is disconnected. I can only solve this by unplugging and replugging the ethernet cable but this also does not work all of the time. I have 2 Pis with a similar setup and they both have this problem. All my other devices work fine. I have installed an Apache server with Owncloud, fail2ban and the OpenSSH server. I have no idea what to do now. Any help would appreciated.
Re: network problem
Hi,sschubert wrote:If I reboot DietPi the ethernet connection does not work all of the time. When I go to the network settings it says that ethernet is disconnected. I can only solve this by unplugging and replugging the ethernet cable but this also does not work all of the time. I have 2 Pis with a similar setup and they both have this problem. All my other devices work fine. I have installed an Apache server with Owncloud, fail2ban and the OpenSSH server. I have no idea what to do now. Any help would appreciated.
If all devices are having the same issue, it could be an issue with your router. It sounds like its failing to provide DCHP leases.
Try manually bringing up the adapter:
This will drop connections, so best to do it at the device.
Code: Select all
ifdown eth0
killall -w dhclient
systemctl restart networking
ifup eth0
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: network problem
I've tried your steps but I still don't know what the problem is. Maybe you can see something in the screen shot.
Re: network problem
Thanks.sschubert wrote:I've tried your steps but I still don't know what the problem is. Maybe you can see something in the screen shot.
Need some more info. After a fresh reboot, can you take pictures of the following:
Code: Select all
ifconfig -a
ifdown eth0
killall -w dhclient
ifup eth0
ifconfig -a
- have you tried using a different network cable?
- Is this device connected directly to your router via a network cable, or a switch hub?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: network problem
Please see the attached screenshots. This time the ethernet connection was repaired after executing your commands. But it does not seem to work all of the time. You can see the configuration before in 1.jpg and after in 3.jpg (the attachements seem to have the wrong order in the forum).Fourdee wrote:Need some more info. After a fresh reboot, can you take pictures of the following:
Code: Select all
ifconfig -a
ifdown eth0
killall -w dhclient
ifup eth0
ifconfig -a
Yes I have tried a different network cable and the pi is directly connected to the router. My router and internet provider already have full IPv6 support in addition to IPv4 in case this does matter. This pi has wifi but it is disabled in the DietPi configuration.sschubert wrote:Also, some questions:
- have you tried using a different network cable?
- Is this device connected directly to your router via a network cable, or a switch hub?
Re: network problem
Hi sschubert,
Thanks for the results.
It looks like the WiFi connection is still active, lets try and disable it again:
. Please hide any WiFi keys (if set).
Some more questions:
- Which PSU are you using on this device (eg: Samsung 2a)?
- Which SD card (eg: Sandisk Ultra 8gb)?
- Is this a RPi3 ?
Thanks for the results.
It looks like the WiFi connection is still active, lets try and disable it again:
Code: Select all
/DietPi/dietpi/func/dietpi-set_wifi_bt wifi 0
reboot
Might be a gateway/subnet issue, can you take a picture of the following please:send_packet: Network is unreachable
Code: Select all
cat /etc/network/interfaces
Some more questions:
- Which PSU are you using on this device (eg: Samsung 2a)?
- Which SD card (eg: Sandisk Ultra 8gb)?
- Is this a RPi3 ?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: network problem
I can't find this script on my pi. There are others like dietpi-set_wificountrycode but not that one.Fourdee wrote:It looks like the WiFi connection is still active, lets try and disable it again:
Code: Select all
/DietPi/dietpi/func/dietpi-set_wifi_bt wifi 0
reboot
The content of the file is:Fourdee wrote: send_packet: Network is unreachable
Might be a gateway/subnet issue, can you take a picture of the following please:
Code: Select all
cat /etc/network/interfaces
. Please hide any WiFi keys (if set).
Code: Select all
#/etc/network/interfaces
#Please use DietPi-Config to modify network settings.
# Local
auto lo
iface lo inet loopback
# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp
metric 0
address 192.168.178.30
netmask 255.255.255.0
gateway 192.168.178.1
#dns-nameservers 192.168.178.1
# Wifi
#allow-hotplug wlan0
iface wlan0 inet dhcp
metric 1
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
wireless-essid XXX
wireless-key XXX
wireless-mode Managed
wireless-power off
wpa-ssid XXX
wpa-psk XXX
#dns-nameservers 8.8.8.8 8.8.4.4
I have the Raspi3 PSU.Fourdee wrote:- Which PSU are you using on this device (eg: Samsung 2a)?
I have a Sandisk Ultra 32GB.sschubert wrote:- Which SD card (eg: Sandisk Ultra 8gb)?
Yes this one is a Rapi3 but I also have a Rapi 2 and it has the same problems.sschubert wrote:- Is this a RPi3 ?