LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-05-2001, 04:49 PM   #1
Fruitbat
LQ Newbie
 
Registered: Jun 2001
Location: UK
Posts: 29

Rep: Reputation: 15
W2K to RH7.1 socket problem


I cannot establish proper communications between my W2K and RH7.1 machines (both fitted with FA311 NICs).

TCP/IP settings are:

W2K: 191.168.1.1
RH7.1: 192.168.1.2
Mask: 255.255.255.0

Ping works OK in both directions. Also because of reported problems with the FA311 driver I've downloaded and installed the latest natsemi driver from Netgear.

I am using a couple of simple Perl scripts (a client and a server). Both scripts run on both machines.

The W2K client can call the W2K server OK
The RH7.1 client can call the RH7.1 server OK
The RH7.1 client can call the W2K server OK
but...
The W2K client cannot connect to the RH7.1 server.

The call to connect() times out.

The server script expects 2 args..
The server IP address
A port number (I used 77)

The client script expects 3+ args
The server IP address
The server port number (77)
A message of some sort

The scripts are included below...

#!/usr/bin/perl -w
# Simple client

use strict;
use Socket;

my ($ipa, $port, @msg) = @ARGV;

socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die "socket() failed";
my $ipan = inet_aton($ipa) or die "inet_aton() failed";
my $ipad = sockaddr_in($port, $ipan) or die "sockaddr_in() failed";
connect(SERVER, $ipad) or die "connect() failed";
select SERVER; $| = 1; select STDOUT;
print SERVER "@msg\n";
print <SERVER>;

#!/usr/bin/perl -w
# Simple server

use strict;
use Socket;

my ($ipa, $port) = @ARGV;

socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die "socket() failed";
my $ipan = inet_aton($ipa) or die "inet_aton() failed";
my $ipad = sockaddr_in($port, $ipan) or die "sockaddr_in() failed";
bind(SERVER, $ipad) or die "bind() failed";
listen(SERVER, SOMAXCONN) or die "listen() failed";
accept(CLIENT, SERVER) or die "accept() failed";

select CLIENT; $| = 1; select STDOUT;
my $msg = <CLIENT>;
print CLIENT ">>> $msg";
close CLIENT;
close SERVER;

Last edited by Fruitbat; 08-06-2001 at 06:01 AM.
 
Old 08-29-2001, 10:02 AM   #2
matt
Member
 
Registered: Jul 2001
Location: Chicago
Distribution: RH7.1 ; OSX
Posts: 62

Rep: Reputation: 15
Fruitbat,

I got here by looking at your other problem post about your linux box not being accessible from Windoze, cause I've been beating my head against the wall for a week on this. Seems like we have similar woes!

My threads for these are:

http://www.linuxquestions.org/questi...2F%2FLocalhost

http://www.linuxquestions.org/questi...&threadid=5964

While I can't solve your problem, as I'm still trying to fix mine, maybe we can help eachother out a bit.

One thing I did that gave me new hope was to see if I could reach the Windoze box from the Linux box. With Samba up and running, try this from a command line:

# smbclient "\\\\WindozeBox\\ShareFolderPath"

I believe that's the correct wording (not at home now). Your should then be asked for a password, and get an "smb>" prompt and be able to cruise aournd your Windoze shares. Type "exit" to end the session.

You can also try:

# smbclient -L WindozeBoxName

This will show any shares on your windows box.

Not sure if this will help, but may at least aid in your troubleshooting. (sorry if you already know this!)

Let me know if you have any luck!

)M.
 
Old 09-05-2001, 11:41 AM   #3
matt
Member
 
Registered: Jul 2001
Location: Chicago
Distribution: RH7.1 ; OSX
Posts: 62

Rep: Reputation: 15
Thumbs up

I fixed my connection problems by reinstalling the OS as a Server (had previously done Workstation), and then firing up SWAT and not messing with manual tweaks off the bat. A few clicks later I was seeing shares from Windoze on my new Linux server.
 
  


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
Samba on RH7.3 talking to W2K DC AutoBahn Linux - Networking 0 02-24-2004 05:44 PM
SAMBA bet RH 9 & W2K with Netgear Router - can't see W2K share cevjr Linux - Software 0 07-30-2003 11:44 AM
Installed W2k, then RH 7.3 but grub now can't see W2K ericcarlson Linux - General 5 07-17-2002 05:08 PM
installing RH7.2 or 7.3 fails; RH7.1 & W2k work great river Linux - Software 4 05-24-2002 04:45 PM
tricky dual boot question--w2k/rh7.1 glock19 Linux - General 3 08-09-2001 11:19 PM

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

All times are GMT -5. The time now is 11:15 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