Solved

Connect 2 linuxboxes

Posted on 1997-08-06
6
215 Views
Last Modified: 2010-03-17
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
 
0
Comment
Question by:cl071997
  • 3
  • 3
6 Comments
 
LVL 3

Accepted Solution

by:
sauron earned 100 total points
ID: 1585858
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
 

Author Comment

by:cl071997
ID: 1585859
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
 
LVL 3

Expert Comment

by:sauron
ID: 1585860
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:cl071997
ID: 1585861
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
 
LVL 3

Expert Comment

by:sauron
ID: 1585862
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
 

Author Comment

by:cl071997
ID: 1585863
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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now