Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Networking - No Route to Host


Gina

Recommended Posts

Let's step back... First of all Raspberry is configured with a hostname. The hostname (if properly configured i.e. gina.local as a fqdn) is registered with a local network. This way you can access your Raspberry using a name not ip. HOWEVER, if you connect to the same local network over wireless and then wire, the hostname will usually point to the first registration i.e. wireless IP, not wire IP (and the other way around). So, first of all you cannot have both connections active. Moreover I would avoid switching between wireless and wire, unless you reboot and let your local network associate a hostname with specific ip (wire or wireless). All of these relate to local name resolution.

As to diagnose the issue, don't use hostname in your ssh at all. Connect your Raspberry over EITHER wire or wireless, determine device IP (check the router or scan your local network with nmap -sP 192.168.1.2-254) and use IP for ssh. Before doing this you can always ping IP to see if it's active.

Messing with /etc/network/interfaces disables interface for Network Manager. You can do this but why complicate things?

Link to comment
Share on other sites

  • Replies 208
  • Created
  • Last Reply

While i agree ,on the most part with  Radekk, it is possible to have the two interfaces configured so that when the wired is plugged in the Wifi if disabled and visa verse when using the same network. Using ifplud.

To use both wireless and wired on the RPI I would humbly suggest you need to use ifplugd - this demon just enables or disables the Wifi depending on the wired connection. Doing this means you can use the same network and Hostname etc. Note I am assuming here that you have just one IP network !

Multi homing networks (on the same IP network) using 2 or more network interfaces is quite possible but complicated. The Laptop I am typing this on is connected both Wired and Wirelessly to the same IP network - but its Windows ? However now and then and especially when DHCP leases expire DNS does get mixed up - so I just changed the lease expiry (could have used static addresses)

Also if you use the "priority=" KEYWORD in WPA https://raspberrypi.stackexchange.com/questions/58304/how-to-set-wifi-network-priority this enables Wifi connections to be "ordered".

Hopefully your networking files are not too messed up and I suggest using a copy of your SD card before doing any more changes.

I suspect you "Router" or whatever device is the default local DNS/Arp device is giving conflicting routing information if you are defaulting everything on the RPI. It would be interesting to see the Routing Table on the RPI before you do any changes to see what sate that is in when you get the message  - use ROUTE PRINT or I believe NETSTAT will give the same info. Plus APR -a output might also be interesting it shows your local cache  - all commands shown here should be in lower case ! Example shown is from my laptop 

routing.jpg.981c9047fadfcd8bf89a15adafaab5bb.jpg

Link to comment
Share on other sites

Have it all set up and been trying to get things to work but the screen display size is bigger than the hardware and only the central part is visible.  I can't get to any controls/menu to reset the screen size or resolution or to do anything useful.  It comes up in the Ubuntu MATE introductory screen.  I don't really want to start from scratch with a blank SD card.  Anyone know of a key sequence I can use to get out of this dead end?

Link to comment
Share on other sites

58 minutes ago, Gina said:

Have it all set up and been trying to get things to work but the screen display size is bigger than the hardware and only the central part is visible.  I can't get to any controls/menu to reset the screen size or resolution or to do anything useful.  It comes up in the Ubuntu MATE introductory screen.  I don't really want to start from scratch with a blank SD card.  Anyone know of a key sequence I can use to get out of this dead end?

try this https://askubuntu.com/questions/281509/how-do-i-change-the-screen-resolution-using-ubuntu-command-line/398740

 

Link to comment
Share on other sites

40 minutes ago, Gina said:

Tried most of those and get "Can't open display".  eg.


gina@asc2:~$ xrandr -q
Can't open display

 

try SUDO first - do "sudo xrandr -q"  Plus you do have a Window (Xorg) session running right ? 

Link to comment
Share on other sites

OK - I can disable overscan in config.txt - I'll try that though the notes point to it being the wrong thing to do.  The HDMI resolution is set to 4 which is 640 x 480 60Hz.  I have the SD card out of the RPi and in my Mint box.  I'll see if I can find the WiFi configuration while I've looking at the file system.

Link to comment
Share on other sites

Well...  That's fixed it !!!  No HDMI output at all now!!!

## disable_overscan
##     Set to 1 to disable overscan
##     Disable overscan if your display has a black border of unused pixels
##     visible and your display can output without overscan
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Overscan Enabled (Default)
##     1        Overscan Disabled
##
disable_overscan=1

 

Link to comment
Share on other sites

2 minutes ago, Gina said:

Well...  That's fixed it !!!  No HDMI output at all now!!!

Oh dear :)

Perhaps 640x480 is a bit too small for your television and it just won't do it?  1024x768 might be worth a go, or 1280x1024?

James

Link to comment
Share on other sites

18 hours ago, Gina said:

Tried most of those and get "Can't open display".  eg.


gina@asc2:~$ xrandr -q
Can't open display

 

Have you tried using the -X option when connecting to asc2. It forwards the X program output over the ssh connection. Will only work (easily) when connecting from linux or mac as they have X servers built in. 

ssh -X gina@asc2

 

Link to comment
Share on other sites

It was showing a display with 640x480, just that much of the display was off the screen.  I'll comment out

disable_overscan=1

and set the resolution to 1024x768 and see what happens.

Link to comment
Share on other sites

Ah, right, I thought you mean it didn't work at all.

If you can get enough of the display on the screen then it's possible you might be able to see the main menu by hitting the "windows" key (assuming your keyboard has one).

James

Link to comment
Share on other sites

Startup text shown normally.  Screen reporting 1024x786 60Hz.  Oh... got to the point of showing "Starting Plymouth ..." and not the screen is saying "no signal HDMI1".

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.