Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I'm new here, so apologies if this has already been answered, but I have searched with no joy. We have some debian 5 based machines, which I would ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    1

    ping debian hostname


    Hi all, I'm new here, so apologies if this has already been answered, but I have searched with no joy.

    We have some debian 5 based machines, which I would like to move from static to dhcp addressing. This is because they will be moved to different locations, where routers may vary etc.
    I have set a hostname (/bin/hostname), but when I try to ping that hostname, it says unknown host. If i try to ping hostname.local it works, but only for that machine. I need it to be reach able by the other machines.

    The only cure I've found only was to enter the IP into the hosts file, but due to me needing dhcp, this isnt ideal.

    Can anyone shed any light onto this?

    below are my network configs.

    "/etc/network/interfaces"
    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet dhcp
    hostname test
    "/etc/hosts"
    127.0.0.1 localhost.localdomain localhost
    "/etc/resolv.conf"
    nameserver 208.67.222.222
    nameserver 208.67.220.220
    # have also tried this with router IP

  2. #2
    Linux User cheesecake42's Avatar
    Join Date
    Jan 2007
    Location
    Orlando, FL
    Posts
    370
    Quote Originally Posted by ecion View Post
    Hi all, I'm new here, so apologies if this has already been answered, but I have searched with no joy.

    We have some debian 5 based machines, which I would like to move from static to dhcp addressing. This is because they will be moved to different locations, where routers may vary etc.
    I have set a hostname (/bin/hostname), but when I try to ping that hostname, it says unknown host. If i try to ping hostname.local it works, but only for that machine. I need it to be reach able by the other machines.

    The only cure I've found only was to enter the IP into the hosts file, but due to me needing dhcp, this isnt ideal.

    Can anyone shed any light onto this?

    below are my network configs.

    "/etc/network/interfaces"

    "/etc/hosts"

    "/etc/resolv.conf"
    go to /etc/hostname and makes sure that it is updated with your current domain name. If you have already done so and havent restarted your system yet (or if you just set the current name in the file) run the following
    Code:
    /etc/init.d/hostname.sh start

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    probably you think DNS works the same as netbios

    you need the dhcp server to register the clients in a local dns, which you will have to use in order to ping the others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •