Connect 2 linuxboxes

Hi !
I´m trying to connect two Linux boxes but there are some problem. I´m using ethernet. I can ping to the others IP number or host name and that works fine, but when I´m trying to connect with rlogin (example: rlogin carry.home.se) or send a mail (ex: cl@carry.home.se) then I get the message network unreachable. I have in the file "hosts.allow" written ALL:ALL and in "hosts.deny" is everything marked with a '#'. I have not any router address specified and I have read the f...... manual adn . Im using the command 'netconfig' when I configure, I tried with ifconfig and all that but I guess thats the same as netconfig. Im using the IP addresses 195.198.238.0 and 1 and not trying to get outside my litle network at home.
Very greatful for some help here.

Best regards
Claes Lindvall
 
cl071997Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sauronCommented:
Ok, try the following:-

Enter both of your hosts names and IP addresses into your /etc/hosts file. Copy the same hosts file to both machines. Ensure your /etc/resolv.conf file is not specifying any nameservers. If this is the case when rlogin attempts authentication, it will check the identity of the client in the DNS. If you have nameserver entries in resolv.conf, they may be on a network that is unreachable.

Check your /etc/host.conf file. It should contain:-
----------------
order hosts,bind
multi on
----------------
The order line is important

Then try a few tests...

1/ Ping machine 2 from machine 1, using the numerical IP address.
2/ Ping machine 2 from machine 1, using the hostname.
3/ Telnet to machine 2 from machine 1, with IP.
4/ Telnet to machine 2 from machine 1, with hostname.

These should all work for you. If any don't, let me know which ones fail, and also post the output of an ifconfig and route -n command.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cl071997Author Commented:
Hi again!
Thanks for your answer. It didn´t help :-).
If you want I can send you the output of ifconfig and route -n, but I think the problem is here. You se I can ping to the machines, both with IP number and hostname but I cant telnet. Machine number 1 is trying... and machine number 2 is saying that the network is unreachable.
Now, when I´m trying to write (on machine number 1) 'route add -net 195.198.238.1' (which is machine number 2´s address) I get the error message : SIOCADDRT: invalid argument.
I have reinstalled the kernel and configured it by the book. The network card is 3Com 3c509. I have on the network card used the default settings and at boot-time I see that it is accepted.
I´m using kernel 2.0.29. Thank you again.
Claes Lindvall
0
sauronCommented:
When you boot the machine, the network scripts that get run are
in /etc/sysconfig/network-scripts. Check these to see that they appear ok.

run /etc/rc.d/init.d network stop, then network start. Any error messages??

Try to telnet to localhost - does this work?

What are your subnet addresses?

Post route -n output anyway please...


0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

cl071997Author Commented:
Hi again!

Sorry for the delay, I´ve been pretty busy for some days..
Well, where were we...

I can ping from both machines to each other and that works fine and from machine nr 1 (IP 195.198.238.0 hostname: stat) when I try to telnet I get the message Trying...and no more.

From machine nr 2 (IP: 195.198.238.1 hostname: carry) I get the message: Network unreachable...

I get an errormessage when I try to stop and start rc.inet2 (I couldn´t find any inet.d) and that was something about the printerspooler... When I tried the same thing on rc.inet1 there were no errormessages.

Here is the output from machine nr 1, stat, when I pressed route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
195.198.238.1   0.0.0.0         255.255.255.255 UH    0      0        1 eth0
195.198.238.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        3 lo


Here is the output from machine nr 2, carry, when I pressed route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
195.198.238.1   0.0.0.0         255.255.255.255 UH    0      0        0 eth0
195.198.238.0   0.0.0.0         255.255.255.0   U     0      0        2 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        2 lo

There is no problem to telnet to localhost

Regards
Claes Lindvall


0
sauronCommented:
I think your routing tables are slightly screwed. You appear to have a host route to your own IP address, which I don't have anywhere.

Oh and you've made a really bad mistake in one place ;-)

You've used 195.198.238.0 as an IP address. You can't do this. the .0 address is the network address, and trying to use this as a host address will screw things up majorly. Use .1 and .2

The reason you couldn't run /etc/rc.d/init.d/network start and stop seems to be that you are using the older initialisation method - are you running Slackware?

Check your IP address and subnet mask etc at the beginning of /etc/rc.d/rc.inet1.

You should have

IP address 195.198.238.1 (or.2)
Network address 195.198.238.0
Broadcast address 195.198.238.255
subnet mask 255.255.255.0

If you have no internet connection, comment out the line in rc.inet1 that looks like :-

/sbin/route add default gw ${GATEWAY} metric 1

Then reboot the machines. When you do route -n now, you should get:-

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
195.198.238.0 0.0.0.0 255.255.255.0 U 0 0 2 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 2 lo

If you do get all this, telnet should work for you. Try numeric IP's and hostnames. Of course, the hosts table will still have to be right.
0
cl071997Author Commented:
Oh, what a great guy/girl you are.

The problem were my IP address as you said. When I changed the address from 195.198.238.0 to 1 and 2 instead...oh, what a difference. Now I can telnet and rlogin just like that.

Thank you very much.

A happy
Claes Lindvall
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.