RE: Problem with Net::Ping to DFS cluster

Ken Cornetet <[email protected]> Fri, 20 Apr 2012 08:50:58 -0400
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <DF6A68E27C9C734592018E2317E95836078E79FA65@nts532.kii.kimball.com>
I'll make a wild guess here: Is it possible that the alias is not in DNS? Perhaps one machine you are testing from has WINS enabled and it is resolving the cluster alias. 

Microsoft's tcpip stack will use WINS for name resolution if it is available.

Try modifying your script so that $pinghost is a FQDN. If it then fails on both machines, DNS is your answer.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Oeschey, Lars (I/ET-83, extern)
Sent: Friday, April 20, 2012 8:35 AM
To: [email protected]
Subject: Problem with Net::Ping to DFS cluster

Hi,

I have a little script, that first checks the availability of a DFS Cluster here. The cluster has an alias name which is used to map drives etc., so I'm using that alias to ping it for availability.
I can ping that alias in a dosbox.
When I use a normal servername to ping, it works with the script.
When I use the clusteralias, it works from one machine, from another not.

This is the code I use:

use strict;
use warnings;
use Win32::FileOp;
use Term::ReadKey;

my $pinghost="dfsalias";

print "Checking avalability of destination...";
my $p = Net::Ping->new();
if (!$p->ping($pinghost)) {
	print "\ncan't reach $pinghost: no network? Exiting!\n";
	print "\nPress any key to continue...";
	ReadMode('cbreak');
	my $key = ReadKey(0);
	ReadMode('normal');
	exit;
}

Any ideas? I know it must have to do something with that alias...

Lars
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs