LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2005, 01:38 PM   #1
vito_huang
Member
 
Registered: Oct 2004
Posts: 68

Rep: Reputation: 15
no route to host


i have two computers with one using redhat fedora core3 and another one using knoppix 4, i try to connect them together using the following commands:

on redhat one:
ifconfig eth0 down
ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 eth0

on knoppix one:
ifconfig eth1 down
ifconfig eth1 192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 eth1

these two computers can ping each other, and redhat one can ssh to knoppix one, but the problem is knoppix one can not ssh to redhat one, and can not telnet to any ports, it said something like: there is no route to the remote host.

i also try to add an gateway with
route add default gw 192.168.1.254 eth1(eth0)
but it doesn't make any different.

what is the problem? how can i fixe it?
 
Old 06-12-2005, 03:24 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
is it possible to have an IP ending with 0?
192.168.1.0?
 
Old 06-12-2005, 05:32 PM   #3
rkettle
Member
 
Registered: Jun 2005
Posts: 204

Rep: Reputation: 30
quite right, you cannot have an ip ending in 0. Are you using DHCP? What is your gateway? Does it give out DNS?
 
Old 06-12-2005, 06:38 PM   #4
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
yeah, first question is are you using dhcp. second question is are you behind a router? if you are behind a router, then the gateway ip address you put in has to match your router's ip address. mine is 192.168.1.1 (which is fairly common). so

route add default gw 192.168.1.1

for that. for ip addresses for your two machines, why not stick to the traditional 192.168.1.100 and 192.168.1.101? then at least we can narrow down the problem if it continues.
 
Old 06-13-2005, 06:43 AM   #5
vito_huang
Member
 
Registered: Oct 2004
Posts: 68

Original Poster
Rep: Reputation: 15
the answers are i don't using dhcp and not behind any routers, but why the machine with redhat can ping and ssh to knoppix one, and canot use knoppix machine to any ports???
 
Old 06-14-2005, 10:03 AM   #6
OneManArmy
Member
 
Registered: Apr 2004
Location: Motherboard
Distribution: Debian GNU/Linux
Posts: 156

Rep: Reputation: 30
Quote:
Originally posted by vito_huang
the answers are i don't using dhcp and not behind any routers, but why the machine with redhat can ping and ssh to knoppix one, and canot use knoppix machine to any ports???
Make sure that the redhat machine is not running any firewalls which might be blocking
the connection to it. You can know this by running the shell command "iptables -L" on
the redhat machine.
 
Old 06-14-2005, 10:10 AM   #7
OneManArmy
Member
 
Registered: Apr 2004
Location: Motherboard
Distribution: Debian GNU/Linux
Posts: 156

Rep: Reputation: 30
I don't know what are you exactly trying to do, but for me I just wanted to connect
two machines directly to copy a couple of files. This meant they needed to be
on the same network.
So specifying the ipaddress and the netmask are enough.
- machine one: 192.168.1.1
- machine two: 192.168.1.2
- netmask for both : 255.255.255.0

Restart the network services and everything should work.
 
  


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
No route to host Airwaves Linux - Networking 2 11-04-2005 08:15 AM
no route to host PenguinHead Linux - Networking 9 02-02-2005 03:03 PM
no route to host php *BSD 2 11-10-2004 03:05 PM
No route to host senzoga Linux - Networking 1 07-14-2004 07:03 PM
No Route To Host Que Linux - General 10 08-19-2002 09:22 AM


All times are GMT -5. The time now is 09:51 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration