LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-03-2004, 03:14 AM   #1
jlturbos
Member
 
Registered: Jun 2002
Location: Pennsylvania
Distribution: Anything and Everything
Posts: 61

Rep: Reputation: 15
Trying to get 2 machines talking and both on internet?


I have researched the networking HOWTO and searched the posts to no avail.

Here is the problem:
I have 2 machines and an Adelphia cable internet connection. My main machine is running Mandrake 9.2 with 2 ethernet cards eth0 and eth1, connected to the net and both cards are working.
The other machine is running Slackware 9.1 with 1 ethernet card and it works fine.

I gave the mandrake machine an ip address of 192.168.1.1 and the slack machine an ip address of 192.168.1.2 like this:
me@slackware:# ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up
me@mandrake:# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
Then
me@slackware:# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
me@slackware:# route add default gw 192.168.1.1 eth0

Slackware:
/etc/hosts
127.0.0.1 localhost loopback
192.168.1.2 slackware.home.org slackware

Mandrake:
/etc/hosts
127.0.0.1 localhost loopback
192.168.1.1 mandrake.home.org mandrake

/etc/resolv.conf
domain home.org
search bflony.adelphia.net local
nameserver 127.0.0.1
nameserver 68.168.224.165
nameserver 68.168.224.162

me@slackware:# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:E6:3B:82:87
inet addr:24.50.126.45 Bcast:24.50.126.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22915 errors:0 dropped:0 overruns:0 frame:0
TX packets:2519 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2862738 (2.7 Mb) TX bytes:318664 (311.1 Kb)
Interrupt:5 Base address:0xd800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:466 errors:0 dropped:0 overruns:0 frame:0
TX packets:466 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31336 (30.6 Kb) TX bytes:31336 (30.6 Kb)

me@mandrake:# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:E6:3B:82:87
inet addr:24.50.126.45 Bcast:24.50.126.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22915 errors:0 dropped:0 overruns:0 frame:0
TX packets:2519 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2862738 (2.7 Mb) TX bytes:318664 (311.1 Kb)
Interrupt:5 Base address:0xd800

eth1 Link encap:Ethernet HWaddr 00:80:29:65C:BF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:120 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:7200 (7.0 Kb) TX bytes:2478 (2.4 Kb)
Interrupt:11 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:466 errors:0 dropped:0 overruns:0 frame:0
TX packets:466 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31336 (30.6 Kb) TX bytes:31336 (30.6 Kb)

When I try and connect to the mandrake box, the RX packets on eth1 go up, but I can't connect.

My questions are:
1. Why can't I get the two machines to ping or talk to each other?
2. How do I set it up so I may connect to the net with the slackware box?
3. What programs are good for talking to another machine? (ssh, telnet, webmin, nfs)

Thanks,
JL
 
Old 03-03-2004, 03:36 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Put all of your address in /etc/hosts:
127.0.0.1 localhost loopback
192.168.1.2 slackware.home.org slackware
192.168.1.1 mandrake.home.org mandrake

You are missing entries for each others computer in your /etc/hosts file.
You will want to run the MCC -> Internet Connection Sharing wizard on the Mandrake computer. This will set up the NAT translation for you.
 
Old 03-03-2004, 08:16 AM   #3
jlturbos
Member
 
Registered: Jun 2002
Location: Pennsylvania
Distribution: Anything and Everything
Posts: 61

Original Poster
Rep: Reputation: 15
Thanks for your reply.

Honestly, at one point I had the proper entries in the /etc/hosts file. I wasn't familiar with NAT and I would prefer to do it command line as the internet connection wizard doesn't let me alter the eth1 settings only eth0.

What steps do I need to take and what am I missing?

Can anyone answer my other questions?
 
Old 03-03-2004, 11:57 PM   #4
jlturbos
Member
 
Registered: Jun 2002
Location: Pennsylvania
Distribution: Anything and Everything
Posts: 61

Original Poster
Rep: Reputation: 15
Apparently, the firewall on my Mandrake box was the problem. I am now able to ping from each system. I still don't know how to make the Slackware box access the net.

Guess I have to figure it out on my own.

JL
 
Old 03-04-2004, 09:17 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I have a cable router so I didn't have to use the network sharing wizard, however, since a second NIC card is manditory for sharing the network connection, I don't believe that it uses only one card.

Try getting the internet connection working on that interface first on eth1.
Then get the networking setup between your two computers on the 192.168.0.0 network.

I believe that the wizards use drop down boxes to select the interface you want to work with.

From the ipconfig outputs, If doesn't look like any of your interfaces are connecting.

There is an /etc/network subdirectory that contains the scripts that run to start up your network. The wizards should take care of settng them up properly.
 
Old 03-05-2004, 10:00 AM   #6
jlturbos
Member
 
Registered: Jun 2002
Location: Pennsylvania
Distribution: Anything and Everything
Posts: 61

Original Poster
Rep: Reputation: 15
jschiwal,
The internet connection works on the Mandrake computer, just look at the ifconfig output in my original post and you will see that it has an ip of 24.50.126.45.

I did get the 2 computers talking, like I said it was my firewall. Also, I am not interested in using a brainless wizard. I prefer command line, as I never login to the window system. I only use Mandrake, because I have turned a few people onto it and it is easier for me to help them if I have it installed on my main box.

The only real issue now is to get the Slackware box to connect to the internet thru the Mandrake box. Everything else is ready to go!

How do I turn the Mandrake box into a router? That's the big question.
 
  


Reply



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
How come I can ping between machines, but not get internet? ozymandias Linux - Networking 5 09-11-2005 04:20 PM
Block internet access for windows machines Jeeves Linux - Security 5 08-26-2005 03:54 PM
Two machines and internet access cyclic Linux - Networking 5 02-25-2004 03:38 AM
Internet Sharing on Linux machines varunbihani Linux - Networking 10 07-20-2003 09:34 AM
ssh to multiple lan machines from the internet - How? v00d00101 Linux - Newbie 4 06-20-2003 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:57 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
Open Source Consulting | Domain Registration