Hi,
My pi is connected to the local network of my university by the ethernet port.
I set a static ip address that was given to me especially for the pi , here is my /etc/network/interfaces files :
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 147.96.22.87
netmask 255.255.255.0
gateway 147.96.22.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
I can get the internet for five or ten minutes but then it stop, and i have to reboot my pi each time to make it work again.
Does anybody knows why ?
-
- Posts: 2
- Joined: Fri Jun 07, 2013 9:46 am
- FTrevorGowen
- Forum Moderator
- Posts: 6004
- Joined: Mon Mar 04, 2013 6:12 pm
- Location: Bristol, U.K.
- Contact: Website
Re: Unstable internet connection
Hi Pierre,
Given that my Pi's get their IP addresses (statically) assigned by dhcp from my router I may be wrong (if so, someone will correct me, no doubt) but comparing one of my /etc/network/interfaces files (automatically generated for me) with yours I can see an extra line: "auto eth0" which is not present in mine (the static IP lines are also not present, but I'd expect that). Everything else is the same. (I'm assuming your connection is a "wired" one, not WiFi)
Trev.
Given that my Pi's get their IP addresses (statically) assigned by dhcp from my router I may be wrong (if so, someone will correct me, no doubt) but comparing one of my /etc/network/interfaces files (automatically generated for me) with yours I can see an extra line: "auto eth0" which is not present in mine (the static IP lines are also not present, but I'd expect that). Everything else is the same. (I'm assuming your connection is a "wired" one, not WiFi)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm
Re: Unstable internet connection
Your interface settings are not so different from mine expect I have an entry for "broadcast" which probably isn't required.
When you connection goes dead there are a few things to try out:
- check your eth0 interface for errors, drops and overruns: ifconfig eth0
A high detection of errors could indicate a signal quality cable issue between your LAN port and gateway machine (try ifdown eth0 and then ifup eth0 instead of performing a reboot).
- ping or traceroute your gateway IP: i.e. ping 147.96.22.1 and traceroute 147.96.22.1
- check your ARP table during working internet and then after internet goes down: arp
The arp tool displays the physical MAC address of your Pi and the gateway MAC address, this is especially important if you're experiencing ARP poisoning from other user on the local network.
ARP poisoning can do 2 things: a) make your internet stop working b) re-route all your network packets to another machine which can be monitored and then sent to the actual gateway machine.
If you're experiencing an ARP poisoning attack the change of MAC address for your gateway is usually a dead give away.
Richard S.
When you connection goes dead there are a few things to try out:
- check your eth0 interface for errors, drops and overruns: ifconfig eth0
A high detection of errors could indicate a signal quality cable issue between your LAN port and gateway machine (try ifdown eth0 and then ifup eth0 instead of performing a reboot).
- ping or traceroute your gateway IP: i.e. ping 147.96.22.1 and traceroute 147.96.22.1
- check your ARP table during working internet and then after internet goes down: arp
The arp tool displays the physical MAC address of your Pi and the gateway MAC address, this is especially important if you're experiencing ARP poisoning from other user on the local network.
ARP poisoning can do 2 things: a) make your internet stop working b) re-route all your network packets to another machine which can be monitored and then sent to the actual gateway machine.
If you're experiencing an ARP poisoning attack the change of MAC address for your gateway is usually a dead give away.

Richard S.
-
- Posts: 2
- Joined: Fri Jun 07, 2013 9:46 am
Re: Unstable internet connection
Hi,
Thanks for your answers ! I'll try that !
Thanks for your answers ! I'll try that !
-
- Posts: 24
- Joined: Thu Dec 20, 2012 10:04 am
- Location: Brasil
Re: Unstable internet connection
Pierre try desactivate commands of Wireless configuration .
I think may be conflicts problems with WIFI configurartion.
Change the file too:
I think may be conflicts problems with WIFI configurartion.
Code: Select all
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
Code: Select all
pi@raspberrypi ~ $ sudo nano /etc/resolv.conf
nameserver 147.96.22.1 (your gateway )
nameserver 8.8.8.8 (Google link)