FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-10-2008, 05:08 AM
Lachlan
 
Default ping hostnames ala windows ping.exe?

i've started using lenny for my work pc and there's a feature of the
windows ping.exe that i'm trying to find in linux.

something in windows i've used a lot is pinging by hostname to find
the ip of the pc i'm looking for.
a lot of things i've been doing require me to enter the ip not hostname.

i've looked at arping, sing and oping but i haven't had any luck
accepting anything other than ip's.

all i'm looking for is something along the lines of ~$ hostping
-usehostnames computerhostname
from the commandline.

i'll be using this laptop in a lot of different offices so will i have
to add dns info to my /etc/hosts and /etc/resolv.conf for each
network?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-10-2008, 05:23 AM
manou
 
Default ping hostnames ala windows ping.exe?

On Fri, 10 Oct 2008 15:08:56 +1000
Lachlan <lachlan.00@gmail.com> wrote:

> i've started using lenny for my work pc and there's a feature of the
> windows ping.exe that i'm trying to find in linux.


- You have inetutils-ping and iputils-ping packages in lenny to have the ping utility.


>
> something in windows i've used a lot is pinging by hostname to find
> the ip of the pc i'm looking for.
> a lot of things i've been doing require me to enter the ip not hostname.
>
> i've looked at arping, sing and oping but i haven't had any luck
> accepting anything other than ip's.


- To let you check ip of a hostname, you must have a dns working and you can use something else than ping.
The host command for example.
root@solex:~# host www.google.com
www.google.com CNAME www.l.google.com
www.l.google.com A 64.233.183.147
www.l.google.com A 64.233.183.99
www.l.google.com A 64.233.183.103
www.l.google.com A 64.233.183.104
root@solex:~#



>
> all i'm looking for is something along the lines of ~$ hostping
> -usehostnames computerhostname
> from the commandline.
>
> i'll be using this laptop in a lot of different offices so will i have
> to add dns info to my /etc/hosts and /etc/resolv.conf for each
> network?

- And using different office will not permit you to add hardcoded dns info in /etc/resolv.conf as certainly, each offices will have their own dns server. I guess.

Regards,

manou


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-10-2008, 05:31 AM
Andrei Popescu
 
Default ping hostnames ala windows ping.exe?

On Fri,10.Oct.08, 15:08:56, Lachlan wrote:
> i've started using lenny for my work pc and there's a feature of the
> windows ping.exe that i'm trying to find in linux.
>
> something in windows i've used a lot is pinging by hostname to find
> the ip of the pc i'm looking for.

If you want to have the IP for a given hostname all you need is 'host':

$ host bixi
bixi has address 192.168.77.76

On sid this is in package bind9-host.

> a lot of things i've been doing require me to enter the ip not hostname.
>
> i've looked at arping, sing and oping but i haven't had any luck
> accepting anything other than ip's.
>
> all i'm looking for is something along the lines of ~$ hostping
> -usehostnames computerhostname
> from the commandline.
>
> i'll be using this laptop in a lot of different offices so will i have
> to add dns info to my /etc/hosts and /etc/resolv.conf for each
> network?

There are various tools to deal with changing configurations, you will
have to provide more details. Try to use DHCP as much as possible, as
this will automatically provide the necessary configurations.

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 
Old 10-10-2008, 05:42 AM
Lachlan
 
Default ping hostnames ala windows ping.exe?

2008/10/10 Andrei Popescu <andreimpopescu@gmail.com>:
> On Fri,10.Oct.08, 15:08:56, Lachlan wrote:
>> i've started using lenny for my work pc and there's a feature of the
>> windows ping.exe that i'm trying to find in linux.
>>
>> something in windows i've used a lot is pinging by hostname to find
>> the ip of the pc i'm looking for.
>
> If you want to have the IP for a given hostname all you need is 'host':
>
> $ host bixi
> bixi has address 192.168.77.76
>
> On sid this is in package bind9-host.
>
>> a lot of things i've been doing require me to enter the ip not hostname.
>>
>> i've looked at arping, sing and oping but i haven't had any luck
>> accepting anything other than ip's.
>>
>> all i'm looking for is something along the lines of ~$ hostping
>> -usehostnames computerhostname
>> from the commandline.
>>
>> i'll be using this laptop in a lot of different offices so will i have
>> to add dns info to my /etc/hosts and /etc/resolv.conf for each
>> network?
>
> There are various tools to deal with changing configurations, you will
> have to provide more details. Try to use DHCP as much as possible, as
> this will automatically provide the necessary configurations.
>
> Regards,
> Andrei
> --
> If you can't explain it simply, you don't understand it well enough.
> (Albert Einstein)
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkju6MEACgkQqJyztHCFm9nnfACfbV6lkhf7vV H0siQYereeF/OE
> oaMAoIco6O16Qf+fydNipsjnOua+DoYu
> =I961
> -----END PGP SIGNATURE-----
>
>

okay guys thanks for putting me in the direction of hosts. i was stuck
in the mindest that i had to ping so i never looked up hosts.

hosts does exactly what i want.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-11-2008, 06:57 PM
Tzafrir Cohen
 
Default ping hostnames ala windows ping.exe?

On Fri, Oct 10, 2008 at 08:31:45AM +0300, Andrei Popescu wrote:

> $ host bixi
> bixi has address 192.168.77.76

This only resolves host names through DNS. e.g. ignores your hosts file.

You can ask libc's name resolver directly:

$ getent hosts bixi
$ getent hosts yahoo.com
206.190.60.37 yahoo.com
68.180.206.184 yahoo.com

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 10-11-2008, 09:01 PM
Andrei Popescu
 
Default ping hostnames ala windows ping.exe?

On Sat,11.Oct.08, 18:57:40, Tzafrir Cohen wrote:
> On Fri, Oct 10, 2008 at 08:31:45AM +0300, Andrei Popescu wrote:
>
> > $ host bixi
> > bixi has address 192.168.77.76
>
> This only resolves host names through DNS. e.g. ignores your hosts file.

Ah, it works on my machine because I have a local installation of
dnsmasq

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 

Thread Tools




All times are GMT. The time now is 10:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org