On Sep 16, 4:17 ¨Βν¬ Ωουξεσ Βαηθος Όχ³βχιϊαςτ®®®ΐηναιμ®γονΎ χςοτεΊ > thanks it works but its not correct i try them both: > > if Net::Ping::TCP.new('loocaalhost') > puts 'OK' > else > puts 'NO respons' > end > > if Net::Ping::External.new('loccalhost') > puts 'OK' > else > puts 'NO respons' > end > > this is the output: > OK > OK > webwizartbe-iMac:balbaert younesbaghor$ > > 2 times ok even when the localhost is spelled wrong. You didn't call the ping? method in your example. You just called the constructor. > someone ¨Βξοχθατ τθδιζζεςεξγε ισ βετχεε> Net::Ping::TCP.new('localhost') > Net::Ping::External.new('localhost') The external ping uses your system's ping command. The TCP ping tries to connect to the host via a Ruby TCPSocket. Regards, Dan