Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: ping op hostname lukt niet  (gelezen 3080 keer)

ping op hostname lukt niet
« Gepost op: 2009/03/12, 13:44:07 »
Ik heb een windows pc en een linux(ubuntu) pc met gedeelde printer(LPT) in 1 netwerk hangen.
Windows PC : ip = 10.0.0.2 subnetmask = 255.255.255.0
Linux PC : ip = 10.0.0.1 subnetmask = 255.255.255.0
Als ik op de windows pc ping naar 10.0.0.1 is alles ok, doe ik een ping "hostname" krijg ik geen response.
Hoe kan dit?

Nog een vraagje: ping localhost op linux pc geeft response op 127.0.0.1
ping "hostname" geeft response op 127.0.1.1
Moet dit ook niet opo 127.0.0.1?

Re: ping op hostname lukt niet
« Reactie #1 Gepost op: 2009/03/12, 14:29:47 »
Heb je de juiste hostnaam?
Bij mij ziet het er zo uit.
gijs@gijs-8:~$ ping gijs-8
PING gijs-8.10 (127.0.1.1) 56(84) bytes of data.
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=2 ttl=64 time=0.040 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=3 ttl=64 time=0.036 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=4 ttl=64 time=0.040 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=5 ttl=64 time=0.036 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=6 ttl=64 time=0.040 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=7 ttl=64 time=0.038 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=8 ttl=64 time=0.041 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=9 ttl=64 time=0.037 ms
64 bytes from gijs-8.10 (127.0.1.1): icmp_seq=10 ttl=64 time=0.040 ms

Of extern
gijs@gijs-8:~$ ping www.upc.nl
PING www.upc.nl (213.46.242.101) 56(84) bytes of data.
64 bytes from 213.46.242.101: icmp_seq=1 ttl=250 time=7.93 ms
64 bytes from 213.46.242.101: icmp_seq=2 ttl=250 time=8.51 ms
64 bytes from 213.46.242.101: icmp_seq=3 ttl=250 time=7.47 ms
64 bytes from 213.46.242.101: icmp_seq=4 ttl=250 time=7.31 ms

Met vriendelijke groet,

Gijs
In der Beschränkung zeigt sich der Meister.

Offline joop905

  • Lid
Re: ping op hostname lukt niet
« Reactie #2 Gepost op: 2009/03/12, 18:44:26 »
geen Gateway-adres


GrJ.

Offline testcees

  • Documentatieteam
    • testcees
    • www.testcees.nl
Re: ping op hostname lukt niet
« Reactie #3 Gepost op: 2009/03/12, 23:16:44 »
Nog een vraagje: ping localhost op linux pc geeft response op 127.0.0.1
ping "hostname" geeft response op 127.0.1.1
Moet dit ook niet opo 127.0.0.1?
Dat is normaal, zo wordt ubuntu standaard geïnstalleerd. Zie de eerste 2 regels van je /etc/hosts:
cees@ubuntu:~$ more /etc/hosts
127.0.0.1 localhost
127.0.1.1 hostname
...
Klik links bovenin op Documentatie

Offline ivo

  • Lid
Re: ping op hostname lukt niet
« Reactie #4 Gepost op: 2009/03/15, 21:04:28 »
geen Gateway-adres


GrJ.

10.0.0.1 en 10.0.0.2 zitten in hetzelfde subnet = geen gateway nodig.
There are only 10 types of people in the world; those who understand binary and those who don't.

Offline ivo

  • Lid
Re: ping op hostname lukt niet
« Reactie #5 Gepost op: 2009/03/15, 21:09:05 »
Ik heb een windows pc en een linux(ubuntu) pc met gedeelde printer(LPT) in 1 netwerk hangen.
Windows PC : ip = 10.0.0.2 subnetmask = 255.255.255.0
Linux PC : ip = 10.0.0.1 subnetmask = 255.255.255.0
Als ik op de windows pc ping naar 10.0.0.1 is alles ok, doe ik een ping "hostname" krijg ik geen response.
Hoe kan dit?

Nog een vraagje: ping localhost op linux pc geeft response op 127.0.0.1
ping "hostname" geeft response op 127.0.1.1
Moet dit ook niet opo 127.0.0.1?

Heb je op de windows pc in c:\windows\system32\drivers\etc in het bestand hosts
je linux masjien staan met het ip-adres 10.0.0.1 ?

Waarschijnlijk niet. En omdat ik inschat dat je geen DNS hebt draaien kun je dus vanaf de windows masjien de linux niet op naam pingen. Bovenstaande even doen.

Nog een antwoord; ping hostname op de linux geeft antwoord omdat ie daar die 127.0.1.1 ziet staan.
127.0.0.1 is in etc/hosts een andere hostname. Ping localhost zal hopelijk  ;) de 127.0.0.1 laten zien.


There are only 10 types of people in the world; those who understand binary and those who don't.