Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Networking - No Route to Host


Gina

Recommended Posts

I have replaced the PW with xxxxxxxx after copying - don't want to publish my PW of course.

gina@asc2:~$ sudo iwconfig wlan0 essid Ubiquity key s:xxxxxxxx
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.
gina@asc2:~$ 

 

Link to comment
Share on other sites

  • Replies 208
  • Created
  • Last Reply
3 minutes ago, Gina said:

I have replaced the PW with xxxxxxxx after copying - don't want to publish my PW of course.


gina@asc2:~$ sudo iwconfig wlan0 essid Ubiquity key s:xxxxxxxx
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.
gina@asc2:~$ 

 

It seems that you will need to do it via /etc/network/interfaces

Have a look here for examples:

https://ubuntuforums.org/showthread.php?t=1723325

 

Link to comment
Share on other sites

gina@asc2:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# The loopback network interface
auto lo
iface lo inet loopback
gina@asc2:~$ 
gina@asc2:~$ cat /etc/wpa_supplicant/wpa_supplicant.conf
cat: /etc/wpa_supplicant/wpa_supplicant.conf: No such file or directory
gina@asc2:~$ 

I know I put the information in somewhere!  Anyway, it was working and I haven't edited any file in the micro SD card.

Link to comment
Share on other sites

Think I'll have to take the micro SD card out and search it.  Also think it will have to be tomorrow - tired now and don't want to mess anything up.  Had a busy day.

Thank you for your hepl.

Link to comment
Share on other sites

2 minutes ago, Gina said:

gina@asc2:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# The loopback network interface
auto lo
iface lo inet loopback
gina@asc2:~$ 

gina@asc2:~$ cat /etc/wpa_supplicant/wpa_supplicant.conf
cat: /etc/wpa_supplicant/wpa_supplicant.conf: No such file or directory
gina@asc2:~$ 

I know I put the information in somewhere!  Anyway, it was working and I haven't edited any file in the micro SD card.

did you check /etc/network/interfaces.d directory - maybe each interface has its own config file there (they get included)

Link to comment
Share on other sites

gina@asc2:~$ ls /etc/network
ls: cannot access '/etc/network': No such file or directory
gina@asc2:~$ ls /etc
acpi                    ca-certificates                dictionaries-common  group-           inputrc          lightdm               modules-load.d  ppp               resolv.conf        sshguard        update-motd.d
adduser.conf            ca-certificates.conf           dnsmasq.d            grub.d           insserv          lighttpd              mtab            printcap          rmt                ssl             update-notifier
alternatives            ca-certificates.conf.dpkg-old  dpkg                 gshadow          insserv.conf     locale.alias          nanorc          profile           rpc                subgid          UPower
anacrontab              calendar                       drirc                gshadow-         insserv.conf.d   locale.gen            netscsid.conf   profile.d         rsyslog.conf       subgid-         usb_modeswitch.conf
apache2                 chatscripts                    emacs                gss              inxi.conf        localtime             network         protocols         rsyslog.d          subuid          usb_modeswitch.d
apm                     conky                          environment          gtk-2.0          iproute2         logcheck              NetworkManager  pulse             samba              subuid-         vim
Apogee                  console-setup                  fb.modes             gtk-3.0          issue            login.defs            networks        purple            sane.d             sudoers         vnc
apparmor                cron.d                         ffserver.conf        guest-session    issue.net        logrotate.conf        newt            python            securetty          sudoers.d       vtrgb
apparmor.d              cron.daily                     firefox              gufw             java-8-openjdk   logrotate.d           nsswitch.conf   python2.7         security           sysctl.conf     wgetrc
apport                  cron.hourly                    fish                 hddtemp.db       kbd              lsb-release           ntp.conf        python3           selinux            sysctl.d        wodim.conf
apt                     cron.monthly                   fonts                hdparm.conf      kernel           ltrace.conf           openal          python3.5         sensors3.conf      systemd         wpa_supplicant
astrometry.cfg          crontab                        fstab                host.conf        kerneloops.conf  machine-id            opt             rc0.d             sensors.d          terminfo        X11
at-spi2                 cron.weekly                    fuse.conf            hostname         ldap             magic                 os-release      rc1.d             services           thunderbird     xdg
avahi                   crypttab                       fwupd.conf           hosts            ld.so.cache      magic.mime            pam.conf        rc2.d             sgml               timezone        xml
bash.bashrc             cups                           gai.conf             hosts.allow      ld.so.conf       mailcap               pam.d           rc3.d             shadow             timidity        xrdb
bash_completion         cupshelpers                    gconf                hosts.deny       ld.so.conf.d     mailcap.order         passwd          rc4.d             shadow-            tmpfiles.d      zsh_command_not_found
bash_completion.d       dbus-1                         gdb                  hp               ld.so.preload    manpath.config        passwd-         rc5.d             shells             triggerhappy
bindresvport.blacklist  debconf.conf                   ghostscript          ifplugd          legal            mate-settings-daemon  pcmcia          rc6.d             signond.conf       ucf.conf
binfmt.d                debian_version                 gnome                iftab            libao.conf       menu-methods          perl            rc.local          signon-ui          udev
bluetooth               default                        gnome-app-install    ImageMagick-6    libaudit.conf    mime.types            pki             rcS.d             skel               udisks2
brlapi.key              deluser.conf                   gnome-system-tools   init             libnl-3          mke2fs.conf           pm              request-key.conf  sound              ufw
brltty                  depmod.d                       groff                init.d           libpaper.d       modprobe.d            pnm2ppa.conf    request-key.d     speech-dispatcher  updatedb.conf
brltty.conf             dhcp                           group                initramfs-tools  libreoffice      modules               polkit-1        resolvconf        ssh                update-manager
gina@asc2:~$ 

network directory is there :icon_scratch:

Link to comment
Share on other sites

That is really odd ...

Why don't you just put this into interfaces file, as suggested in that post that I linked to:

auto wlan0 
iface wlan0 inet dhcp
     wpa-driver wext
     wpa-ssid Your_SSID
     wpa-ap-scan 1
     wpa-proto RSN
     wpa-pairwise CCMP
     wpa-group CCMP
     wpa-key-mgmt WPA-PSK
     wpa-psk "Your_WPA-Key_ASCII"

and then do

sudo /etc/init.d/networking restart
Link to comment
Share on other sites

1 minute ago, Gina said:

gina@asc2:~$ ls /etc/network
ls: cannot access '/etc/network': No such file or directory
gina@asc2:~$ ls /etc
acpi                    ca-certificates                dictionaries-common  group-           inputrc          lightdm               modules-load.d  ppp               resolv.conf        sshguard        update-motd.d
adduser.conf            ca-certificates.conf           dnsmasq.d            grub.d           insserv          lighttpd              mtab            printcap          rmt                ssl             update-notifier
alternatives            ca-certificates.conf.dpkg-old  dpkg                 gshadow          insserv.conf     locale.alias          nanorc          profile           rpc                subgid          UPower
anacrontab              calendar                       drirc                gshadow-         insserv.conf.d   locale.gen            netscsid.conf   profile.d         rsyslog.conf       subgid-         usb_modeswitch.conf
apache2                 chatscripts                    emacs                gss              inxi.conf        localtime             network         protocols         rsyslog.d          subuid          usb_modeswitch.d
apm                     conky                          environment          gtk-2.0          iproute2         logcheck              NetworkManager  pulse             samba              subuid-         vim
Apogee                  console-setup                  fb.modes             gtk-3.0          issue            login.defs            networks        purple            sane.d             sudoers         vnc
apparmor                cron.d                         ffserver.conf        guest-session    issue.net        logrotate.conf        newt            python            securetty          sudoers.d       vtrgb
apparmor.d              cron.daily                     firefox              gufw             java-8-openjdk   logrotate.d           nsswitch.conf   python2.7         security           sysctl.conf     wgetrc
apport                  cron.hourly                    fish                 hddtemp.db       kbd              lsb-release           ntp.conf        python3           selinux            sysctl.d        wodim.conf
apt                     cron.monthly                   fonts                hdparm.conf      kernel           ltrace.conf           openal          python3.5         sensors3.conf      systemd         wpa_supplicant
astrometry.cfg          crontab                        fstab                host.conf        kerneloops.conf  machine-id            opt             rc0.d             sensors.d          terminfo        X11
at-spi2                 cron.weekly                    fuse.conf            hostname         ldap             magic                 os-release      rc1.d             services           thunderbird     xdg
avahi                   crypttab                       fwupd.conf           hosts            ld.so.cache      magic.mime            pam.conf        rc2.d             sgml               timezone        xml
bash.bashrc             cups                           gai.conf             hosts.allow      ld.so.conf       mailcap               pam.d           rc3.d             shadow             timidity        xrdb
bash_completion         cupshelpers                    gconf                hosts.deny       ld.so.conf.d     mailcap.order         passwd          rc4.d             shadow-            tmpfiles.d      zsh_command_not_found
bash_completion.d       dbus-1                         gdb                  hp               ld.so.preload    manpath.config        passwd-         rc5.d             shells             triggerhappy
bindresvport.blacklist  debconf.conf                   ghostscript          ifplugd          legal            mate-settings-daemon  pcmcia          rc6.d             signond.conf       ucf.conf
binfmt.d                debian_version                 gnome                iftab            libao.conf       menu-methods          perl            rc.local          signon-ui          udev
bluetooth               default                        gnome-app-install    ImageMagick-6    libaudit.conf    mime.types            pki             rcS.d             skel               udisks2
brlapi.key              deluser.conf                   gnome-system-tools   init             libnl-3          mke2fs.conf           pm              request-key.conf  sound              ufw
brltty                  depmod.d                       groff                init.d           libpaper.d       modprobe.d            pnm2ppa.conf    request-key.d     speech-dispatcher  updatedb.conf
brltty.conf             dhcp                           group                initramfs-tools  libreoffice      modules               polkit-1        resolvconf        ssh                update-manager
gina@asc2:~$ 

network directory is there :icon_scratch:

I guess you must sudo for all of that

 

Link to comment
Share on other sites

gina@asc2:~$ ls /etc/n*
/etc/nanorc  /etc/netscsid.conf  /etc/networks  /etc/nsswitch.conf  /etc/ntp.conf

/etc/network:
if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  interfaces.d

/etc/newt:
palette  palette.original  palette.ubuntu
gina@asc2:~$ 

 

Link to comment
Share on other sites

gina@asc2:~$  sudo ls -la /etc/net* 
-rw-r--r-- 1 root root 2064 Nov 23  2006 /etc/netscsid.conf
-rw-r--r-- 1 root root   91 Oct 22  2015 /etc/networks

/etc/network:
total 40
drwxr-xr-x   7 root root  4096 Feb 11  2017 .
drwxr-xr-x 145 root root 12288 Feb 24 19:00 ..
drwxr-xr-x   2 root root  4096 Feb 11 18:19 if-down.d
drwxr-xr-x   2 root root  4096 Feb 11 18:06 if-post-down.d
drwxr-xr-x   2 root root  4096 Aug 21  2018 if-pre-up.d
drwxr-xr-x   2 root root  4096 Feb 11 18:19 if-up.d
-rw-r--r--   1 root root   207 Feb 11  2017 interfaces
drwxr-xr-x   2 root root  4096 Jan 24  2016 interfaces.d
gina@asc2:~$ 

 

Link to comment
Share on other sites

That is very strange, permissions are fine, no reason why it could not ls existing directory.

I would say two ways to go about this, one would be to edit /etc/network/interfaces and try to bring wlan0 up

But I'm suspecting corrupt file system. Maybe your sdcard in PI is not working properly?

Link to comment
Share on other sites

Was just about to say it's very strange myself.  I think I need to examine the SD card filesystem out of the RPi.  I'll do that tomorrow and post the results.  Very tired now and need to go to bed.  Thanks for your help.  Goodnight.

Link to comment
Share on other sites

Gina,

in your first post you appear to suggest that the hostname "asc2" is associated with the address assigned to the wifi interface, but later on that it's associated with the hard-wired interface.  Have I misunderstood?  It's not an impossible arrangement, but it's probably not something I'd choose to do myself :)

Do you have your router assigning fixed IP addresses for each network interface on the RPi?  By default DHCP servers can force clients to change IP address every so often.  That could perhaps be an issue here.

If the IP addresses are definitely fixed then I'd guess that the RPi has taken the wifi interface offline for some reason.  MInt (and I think Ubuntu and Raspbian) don't actually enable wifi interfaces unless someone is logged in on the console by default, so perhaps something related to that is causing your problem, but I'm not convinced in this instance.  However, if you look in the network configuration dialog on the RPi you may find that you can force the wifi interface up all of the time (I don't have anything handy to check that on at the moment).

You may get some more information about what's happening if you have a look at the file /var/log/syslog on the RPi.  You'll probably need root access for that.

In any case I'd advise against changing any of the config files under /etc until you actually understand what the problem is, otherwise you may well make things worse.  Many of them are written by GUI tools these days that may not be happy if the file is edited and the format is no longer quite what they expect (I'd quite happily hand-edit them on a system I was never going to use the GUI tools on, but I suspect that's not the case for you).

James

Link to comment
Share on other sites

asc2 got reassigned to the Ethernet port because I cleared the assignments in the router/AP and then when I connected by Ethernet asc2 was assigned to that port.  In the past when I've lost WiFi connection I've done nothing and the WiFi connection has worked again later.  This is only a problem with the ASC as I plan to connect other imaging rigs by CAT6 cable.  This is currently running overground on poles but underground would be preferable if I can stop rats eating it!  I guess I could run a CAT5e cable up to the ASC but WiFi should work.  WiFi signal strength is excellent in the observatory with the Ubiquity AP.

If I could find what is causing this problem I see no reason for needing a cable connection in the observatory.  The data rate over WiFi is adequate.

Link to comment
Share on other sites

Tried the WiFi connection again.  It seems that the IP 192.168.1.78 is recognised, presumably still the RPi WiFi but "No route to host".  If I change IP address it isn't recognised.

gina@Mint-Desktop ~ $ ssh gina@192.168.1.78
ssh: connect to host 192.168.1.78 port 22: No route to host
gina@Mint-Desktop ~ $ ssh gina@192.168.1.79
ssh: connect to host 192.168.1.79 port 22: Connection refused
gina@Mint-Desktop ~ $ ssh gina@192.168.1.78
ssh: connect to host 192.168.1.78 port 22: No route to host
gina@Mint-Desktop ~ $ 

 

Link to comment
Share on other sites

Or is it that IP 192.168.1.78 has been saved somewhere in the Mint system?  Maybe I haven't proved that the RPi WiFi is working after all.

EDIT - switched RPi off and get the same response so IP 192.168.1.78 has been saved rather than found.  Maybe I'll understand all this network stuff someday!!

Link to comment
Share on other sites

There are details about the 192.168.1.78 IP address that may have been cached, certainly.  Ethernet doesn't actually use IP addresses to send data between systems.  It uses a "MAC address" (which appears next to the "ether" tag when you run ifconfig).  The first part of the process when attempting to connect to an unknown system is to broadcast on the network asking for the MAC address of the system using the IP address requested.  If there's an answer from the target  system that data is stored in the ARP cache to avoid having to ask again.

Are you logged in on the console of the RPi at all?  Or do you only ever log in over the network?

James

Link to comment
Share on other sites

I only log in over the network when the ASC is in use as it's up on the observatory roof (or a pole).  I used HIDs to set things up initially as Ubuntu Mate has to be set up that way.  If MAC address is used for WiFi too that would explain the current problem as the RPi I was using died and I swapped it for a new one but it doesn't explain what has happened in the past when nothing was changed.

Link to comment
Share on other sites

Wifi interfaces have MAC addresses too, yes.  The cache expires eventually and it can be flushed manually, but if you swap hardware then what you see makes sense.

My gut feeling is that the older problem is that the RPi's address is being changed by the DHCP server over time.  Does your router allow you to configure its DHCP server to give out fixed addresses?

James

Link to comment
Share on other sites

I think what I'd do is fix two different IP addresses, one for the wifi interface and one for the hard-wired interface.  You'll probably need the MAC addresses to be able to do that.  From your earlier postings it appears that "40:8d:5c:e9:18:c8" is the MAC address for the hard-wired interface and "b8:27:eb:96:8b:1c" is the wifi interface.

Once that is done, rebooting the RPi is probably the simplest way to get the new IP addresses assigned unless you want to log in on the console to stop and restart the network interfaces.

You'll probably also need to flush the arp cache (or wait for the cache to time out) on your desktop so that it asks for the MAC address again.  I think running "ip neigh flush all" as root should flush everything for you.  You can see what is cached on your desktop by running "arp -a" or "ip neigh show all".

James

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.