LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2010, 03:00 PM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
Why would Linux suddenly stop reading /etc/hosts ?


The subject about says it all. Ubuntu 9.10 64 bit (probably the answer) on a Dell Studio XPS 8000. I have entries in my /etc/hosts for other machines on my LAN.
Quote:
ken@taylor12:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 taylor12
192.168.0.109 taylor9
192.168.0.110 taylor10
192.168.0.111 taylor11
192.168.0.112 taylor12
192.168.0.113 taylor13wd
192.168.0.123 taylor13wl
All of the sudden I cannot ssh to taylor12wd (wired connection to my netbook) nor taylor13wl (wireless connection to same). Nor can I ping the machine.
Quote:
ken@taylor12:~$ ssh taylor12wl
ssh: connect to host taylor12wl port 22: No route to host
Quote:
PING taylor12wl (208.69.36.132) 56(84) bytes of data.
64 bytes from hit-nxdomain.opendns.com (208.69.36.132): icmp_seq=1 ttl=48 time=77.4 ms
I can connect or ping if I use the IP address and Gnome Commander and Nautilus can connect over ssh! Only the shell does not work.

This is bizarre!

Ken
 
Old 03-11-2010, 03:10 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
first of all, post the results of 'ifconfig'

no route to host usually meahs that the machine you are trying to talk to is on a different network/subnet then the one you are using, if it wasnt reading the /etc/hosts the error would be
'unknown host' or something like that



just a thought

Last edited by frieza; 03-11-2010 at 03:15 PM.
 
Old 03-11-2010, 03:17 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
First thing is that taylor12wd is not in your /etc/hosts. A typo on your posting?

Second thing is you are getting address resolution OK, but not connection, according to "No route to host". Maybe it's getting an address, but getting the wrong address.

Please provide a copy of the file "/etc/nsswitch.conf" in your next post. For comparison, mine looks like this:
Code:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
You may want to open a 2nd window at the same time and run the command:
Code:
tcpdump -nnl -i eth0 -s 1536
to watch the traffic and, in particular, see if the packets are going to the intended IP address, or some other. Watch for the DNS queries (".53" will be appended to addresses) to see if the lookups are going that way. Look for any queries with "AAAA?" in them, indicating an IPv6 lookup happening.
 
Old 03-11-2010, 03:52 PM   #4
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Original Poster
Rep: Reputation: 174Reputation: 174
Thanks frieza,

The machine I am trying to connect to IS on the same network/subnet. I can connect to it with Nautilus and Gnome Commander.
idconfig on taylor12
Quote:
ken@taylor12:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:25:64:e8:18:2c
inet addr:192.168.0.112 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::225:64ff:fee8:182c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1380 errors:0 dropped:0 overruns:0 frame:0
TX packets:1522 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1108078 (1.1 MB) TX bytes:231185 (231.1 KB)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:96 errors:0 dropped:0 overruns:0 frame:0
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9651 (9.6 KB) TX bytes:9651 (9.6 KB)
and on the netbook
Quote:
ken@taylor13:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:b9:10:64:2f
inet addr:192.168.0.113 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::226:b9ff:fe10:642f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:73 errors:0 dropped:0 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10934 (10.9 KB) TX bytes:10532 (10.5 KB)
Interrupt:19

eth1 Link encap:Ethernet HWaddr 90:4c:e5:1a:22:70
inet addr:192.168.0.123 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::924c:e5ff:fe1a:2270/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:6 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5293 (5.2 KB) TX bytes:6416 (6.4 KB)
Interrupt:17 Base address:0xc000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)
Yes Skaperen, a typo. Trying to connect to taylor13wl
As requested
Quote:
ken@taylor12:~$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat
group: compat
shadow: compat

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
I will try the tcpdump if/when it happens again. Had to reboot my desktop - was burning a DVD and apparently the media was bad. Causes the 800 horsepower machine to grind to a complete halt. Of course I can now connect to the netbook.

I have to say that Ubuntu 9.10, at least the 64 bit version, is the sorriest release of Ubuntu I have used and I have used it since 6.04. Lucid Lynx seems better, even in the alphas. When the beta comes out in a week I will be installing it on this Studio XPS and see what it can do. Other than networking and some hardware strangeness, most of my issues are, I think, associated with the restricted nVidia driver. Lucid has the 2.6.32 kernel which has the open source nVidia driver built in as I understand. Also does away with HAL Can't be any worse

Ken
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop gnome terminal 2.16.0 suddenly switching to Japanese input gnreeke Linux - Newbie 3 06-03-2009 03:44 PM
my sendmail suddenly stop working.. uthinkicare Programming 2 01-12-2007 02:06 AM
ATI fglrx drivers suddenly stop working NosLycn Debian 1 08-10-2006 07:28 PM
keyboard and mouse suddenly stop working TexasDex Linux - Hardware 2 06-04-2004 11:26 PM
Keyboard and mouse suddenly stop working (SuSE 9.0) tygernoot Linux - Hardware 1 05-13-2004 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration