From time to time Raspberry Pi has networking issues. The following script analyzes Pi for common configuration errors and collects various network information, which provides a starting base for people who want to help to solve the issue, if the information is posted in a forum. Right now English and German are supported languages. If you want to help to get support for other  languages into the script just contact the script author (you find the eMail address at the beginning of the script header).

External IPs and MAC adresses together with SSIDs and wpa keys are masqueraded in the output.

 

Script download location

Invocation: raspiNetInfo.sh [-e | -s SSID | -h | -m | -g | -l LANGUAGE]
Parameter:
-e : Test wired connection only
-h : help
-m : Ignore missing networking packages
-s : Test wired and wireless connection
-g : Messages in English only
-l : Write messages in selected language if supported

 

raspiNetInfo.sh was published under the GPL on this site.

 

Example result for cable connection

pi@raspberrypi ~ $ ./raspiNetInfo.sh -e
[spoiler][code]
raspiNetInfo.sh V0.2.7a, 2015-10-26/19:09:54 - 3c36c6b
--- RNI010I: Starting collection of data and network analysis. This may take some time ...
--- RNI012I: Ping of 8.8.8.8 successful
--- RNI012I: Ping of www.google.com successful
--- uname -a
Linux raspberrypi 3.10.25+ #616 PREEMPT Mon Dec 23 18:13:02 GMT 2013 armv6l GNU/Linux
--- [ -d /home/pi/.xbmc ]
no
--- ifconfig (eth und wlan)
eth0      Link encap:Ethernet  HWaddr @@:@@:@@:@@:@@  
          inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: @:@:@:@:@:@:@:@/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71809 errors:0 dropped:54 overruns:0 frame:0
          TX packets:15346 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17064670 (16.2 MiB)  TX bytes:2683138 (2.5 MiB)
wlan0     Link encap:Ethernet  HWaddr @@:@@:@@:@@:@@  
          inet addr:192.168.0.118  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: @:@:@:@:@:@:@:@/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14619 errors:0 dropped:0 overruns:0 frame:0
          TX packets:976 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2503311 (2.3 MiB)  TX bytes:87311 (85.2 KiB)
--- cat /etc/resolv | grep -i "nameserver"
nameserver 192.168.0.1
--- cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.12
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
--- cat /etc/hosts
127.0.0.1    localhost
127.0.1.1    owncloud
--- route -n | egrep "(eth|wlan)"
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
--- RNI016I: Check raspiNetInfo.log for sensitive data before publishing
[/code][/spoiler]

 

Example result for WLAN connection

pi@raspberrypi ~ $ ./raspiNetInfo.sh -s My-WLAN
[spoiler][code]
raspiNetInfo.sh V0.2.7a, 2015-10-26/19:09:54 - 3c36c6b
--- RNI010I: Starting collection of data and network analysis. This may take some time ...
--- RNI012I: Ping of 8.8.8.8 successful
--- RNI012I: Ping of www.google.com successful
--- uname -a
Linux raspberrypi 3.10.25+ #616 PREEMPT Mon Dec 23 18:13:02 GMT 2013 armv6l GNU/Linux
--- [ -d /home/pi/.xbmc ]
no
--- ifconfig (eth und wlan)
eth0      Link encap:Ethernet  HWaddr @@:@@:@@:@@:@@  
          inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: @:@:@:@:@:@:@:@/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72027 errors:0 dropped:54 overruns:0 frame:0
          TX packets:15451 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17098499 (16.3 MiB)  TX bytes:2697695 (2.5 MiB)
wlan0     Link encap:Ethernet  HWaddr @@:@@:@@:@@:@@  
          inet addr:192.168.0.118  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: @:@:@:@:@:@:@:@/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14670 errors:0 dropped:0 overruns:0 frame:0
          TX packets:977 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2514096 (2.3 MiB)  TX bytes:87385 (85.3 KiB)
--- cat /etc/resolv | grep -i "nameserver"
nameserver 192.168.0.1
--- cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.12
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
--- cat /etc/hosts
127.0.0.1    localhost
127.0.1.1    owncloud
--- route -n | egrep "(eth|wlan)"
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
--- lsusb | grep -v "root hub" | grep -i "wire"
Bus 001 Device 005: ID 0846:9030 NetGear, Inc. WNA1100 Wireless-N 150 [Atheros AR9271]
--- iwconfig (eth und wlan)
wlan0     IEEE 802.11bgn  ESSID:"@@@@@@@@"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: @@:@@:@@:@@:@@   
          Link Quality=46/70  Signal level=-64 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:711   Missed beacon:0
--- /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="@@@@@@@@"
    psk="@@@@@@@@"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    auth_alg=OPEN
}
--- grep wpa_action /var/log/messages | tail -n 15
--- RNI016I: Check raspiNetInfo.log for sensitive data before publishing
[/code][/spoiler]

Add comment

Spam Kommentare sind sinnlos !
Vor der Publizierung wird jeder Beitrag auf Spam geprüft. Leider dauert es deswegen bis ein Kommentar sichtbar wird. Dafür erhält aber kein Subscriber Spam eMails.
Die eMail ist optional und nicht öffentlich sichtbar. Sie ist notwendig um eMail Benachrichtigungen zu Antworten auf Kommentare zu erhalten und wird u.U. genutzt um offline zu kommunizieren.

Spam comments are useless !
Any comment will be reviewed first and checked for spam. Unfortunately this delays the publishing of comments but will protect subscribers from spam.
eMail is optional and hidden and is required get update notifications for any comments and may be used to contact you offline