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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-12-2005, 01:38 PM
|
#1
|
Member
Registered: Oct 2004
Posts: 68
Rep:
|
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?
|
|
|
06-12-2005, 03:24 PM
|
#2
|
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040
Rep:
|
is it possible to have an IP ending with 0?
192.168.1.0?
|
|
|
06-12-2005, 05:32 PM
|
#3
|
Member
Registered: Jun 2005
Posts: 204
Rep:
|
quite right, you cannot have an ip ending in 0. Are you using DHCP? What is your gateway? Does it give out DNS?
|
|
|
06-12-2005, 06:38 PM
|
#4
|
Member
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825
Rep:
|
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.
|
|
|
06-13-2005, 06:43 AM
|
#5
|
Member
Registered: Oct 2004
Posts: 68
Original Poster
Rep:
|
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???
|
|
|
06-14-2005, 10:03 AM
|
#6
|
Member
Registered: Apr 2004
Location: Motherboard
Distribution: Debian GNU/Linux
Posts: 156
Rep:
|
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.
|
|
|
06-14-2005, 10:10 AM
|
#7
|
Member
Registered: Apr 2004
Location: Motherboard
Distribution: Debian GNU/Linux
Posts: 156
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 04:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|