Re: TELNET instead PING

From: DCK (dck_at_gazeta.pl)
Date: 01/27/04


Date: Tue, 27 Jan 2004 11:11:22 +0000 (UTC)

Peter Hansen wrote:
> Interesting, but why would you use TELNET for that? Telnet is
> simply one of many possible protocols, whereas you need only
> open a socket to the port to see if the host is responding.
I was on some kind of Network course, where teacher said, that telnet
is better then PING. In my work i found this usefull for pinging
network. When i meet with Python, i foud TELNETLIB module and write
simply scheduled script which probe network.

> from socket import *
> s = socket(AF_INET, SOCK_STREAM)
> try:
> s.connect((host, port))
> print 'host connected'
> s.close()
> except error:
> print 'host not responding'

THX for this advice. In future i will read manual carefully :)

Greetz
Michal DCK Kaczor



Relevant Pages

  • Re: nethack.alt.org server down?
    ... their nameservers aren't responding. ... maybe their hosting service has some network problems. ... but telnet just hangs. ... could be hardware network card failure or power related too. ...
    (rec.games.roguelike.nethack)
  • ACL Question
    ... access-list 101 permit tcp any any eq telnet ... I can now telnet from a host on the network attached to eth1 to a host on the network attached to eth0 ...
    (comp.dcom.sys.cisco)
  • Expect, telnet, frozen console.
    ... telnet into remote host, provide username/password, surrender control to ... This script will eventually be tied into /etc/inittab so that it ... app called 'loe' which presents a login screen in 80x24 ASCII a la ...
    (comp.lang.tcl)
  • Re: rlogin
    ... login the server using telnet, rsh, rlogin and also ssh. ... Telnet does not provide any protection. ... We have only 1 host system. ...
    (comp.unix.aix)
  • Re: unable to send outbound mail using outlook
    ... telnet moses.stphilipchurch.com 25 ... Connecting To moses.stphilipchurch.com...Could not open connection to the ... on port 25: Connect failed ... Connecting To 66.126.247.115...Could not open connection to the host, ...
    (microsoft.public.exchange.admin)