LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-02-2009, 01:01 PM   #1
mohammedahmed86
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Rep: Reputation: 0
telnet: connect to address 192.168.15.3: No route to host


hi fellas im a new member of this group . i m developing a socket programme . my one machine1 ip = 192.168.15.3 when send a string to machine2 ip = 192.168.15.2. the prg works fine but when i do this from machine2 to machine1 this doesnot work.
I pinged each other its fine but when i tried to telnet for 192.168.15.2 to 192.168.15.3 i got this error

telnet: connect to address 192.168.15.3: No route to host

my iptables is empty n SElinux is also disabled i dont understand the prb kindly help me out

regards
M.Ahmed
 
Old 11-02-2009, 01:24 PM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,869

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Try updating your /etc/hosts file on both machines. This is what the entries look like:

Quote:
192.168.1.50 I-Think
192.168.1.20 MrBurnie
192.168.1.27 slacker
One entry for each system on your sub-net.
 
Old 11-02-2009, 02:11 PM   #3
xcristi
Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 35

Rep: Reputation: 16
What the route command says? (on 192.168.15.2)
 
Old 11-03-2009, 01:39 AM   #4
mohammedahmed86
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Original Poster
Rep: Reputation: 0
output of 'route'

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default mywimax 0.0.0.0 UG 0 0 0 eth0
 
Old 11-03-2009, 01:48 AM   #5
mohammedahmed86
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Original Poster
Rep: Reputation: 0
nothing happened with additions on /etc/hosts still the same error
 
Old 11-03-2009, 08:15 AM   #6
xcristi
Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 35

Rep: Reputation: 16
But you are able to connect through ssh to 192.168.15.3?
Eventually try ssh -vvv for debug.

Also, try a nmap scan for 192.168.15.3 and post the results.
 
Old 11-03-2009, 09:31 AM   #7
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,869

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Quote:
nothing happened with additions on /etc/hosts still the same error
This ping fails with the /etc/hosts table updated? Does it pick up the correct IP address when you run the ping? If not, there is something severely wrong in your TCP/IP stack.
 
Old 11-03-2009, 12:53 PM   #8
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Rep: Reputation: 15
Check out the firewall settings, I had problems similar to that and although I added rules to iptables it still didn't work because the firewall settings did have the trusted service selected.

System -> Administration -> Security Level and Firewall

Then under trusted services select telnet and whatever else you wish to use.

Regards,
Chris
 
Old 11-03-2009, 09:09 PM   #9
rkski
Member
 
Registered: Jan 2009
Location: Canada
Distribution: CentOS 6.3, Fedora 17
Posts: 247

Rep: Reputation: 51
The output of #route looks ok.
It looks like the 192.168.3 is not accepting telnet connections. Is port 23 open?
 
Old 11-03-2009, 09:14 PM   #10
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
No route to host ... means that the workstation thinks it cannot get there.

As you have configured both hosts on the same network ... I would say there is something wrong with the Ethernet interface.

There was another recent post with this same problem ... it was found that the ethernet card driver was the cause.
 
Old 11-03-2009, 11:21 PM   #11
mohammedahmed86
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Original Poster
Rep: Reputation: 0
ssh is working i connect both machines with ssh
 
Old 11-03-2009, 11:22 PM   #12
chappel
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Rep: Reputation: 1
Quote:
Originally Posted by dxqcanada View Post
No route to host ... means that the workstation thinks it cannot get there.
Well deduced. It may be helpful to check the arp cache of each machine after pinging from both sides ('arp -a'), and using tcpdump (or wireshark, if you like GUIs) when initiating a ping - you should see an arp request ('who-has IPADDRESS') and then a reply, if the mac isn't already in the cache.

It is also possible there is something odd with the switch between the machines. If it is manageable you could check the mac-address table on it, too.

Hope this helps.

ch
 
Old 11-03-2009, 11:27 PM   #13
chappel
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Rep: Reputation: 1
Quote:
Originally Posted by mohammedahmed86 View Post
ssh is working i connect both machines with ssh
both ping and ssh work, but telnet only runs one-way? Your socket program isn't somehow redirecting port 23 outbound to someplace weird, is it?
 
Old 11-03-2009, 11:30 PM   #14
mohammedahmed86
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Original Poster
Rep: Reputation: 0
@ chris2430 : thanks ,in fact everyone for responding to my prb. It has worked the firewall settings for TCP was not in trusted side on the receiving end .
soon will be coming with others
ThankU all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
RSH connect to address 192.168.1.xxx port 544: Connection refused Permission denied chackercon Linux - Networking 8 04-23-2009 03:06 AM
some other host already uses address 192.168.0.2 keratos Linux - Networking 13 11-20-2008 12:46 PM
Error, some other host already uses address 192.168.1.4 nemobluesix Linux - Wireless Networking 5 07-09-2008 02:42 PM
[root@wlxxb ~]# telnet 192.168.192.12 25 Trying 192.168.192.12... telnet problem cnhawk386 Linux - Networking 1 10-10-2007 03:50 PM
What route to access daisy chained 2d router 192.168.1.1 after 192.168.0.1 (subnets?) Emmanuel_uk Linux - Networking 6 05-05-2006 02:47 AM


All times are GMT -5. The time now is 05:35 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration