Find the answer to your Linux question:
Results 1 to 4 of 4
I have: quagmire 10.0.0.6 (Debian server) plato 10.0.0.12 (Ubuntu laptop) I'm not at home right now so I can't post terminal output atm but this is the situation. This works: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Dover, DE
    Posts
    112

    Name resolution not working on local network


    I have:

    quagmire 10.0.0.6 (Debian server)
    plato 10.0.0.12 (Ubuntu laptop)

    I'm not at home right now so I can't post terminal output atm but this is the situation.

    This works:
    Code:
    me@plato: ping 10.0.0.6
    This works:
    Code:
    me@quagmire: ping 10.0.0.12
    This does not work:
    Code:
    me@plato: ping quagmire
    This does not work:
    Code:
    me@quagmire: ping plato
    With the last two commands the resolved ip address for both of them is the same and obviously not the correct address (200.XXX.YYY.ZZZ, something like that I forget exactly)

    This works:
    Code:
    me@plato: ping quagmire.local
    This works:
    Code:
    me@quagmire: ping plato.local
    So basically when I want to ssh into quagmire I have to use ssh quagmire.local instead of ssh quagmire? I don't want to have to use .local all the time.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    add the appropriate entries in the /etc/hosts file on both machines, e.g.:

    Code:
    10.0.0.6   quagmire quagmire.local # Debian server
    10.0.0.12  plato plato.local       # Ubuntu laptop
    If there is a duplicate entry above it (for 127.0.0.1) you can remove them. Just be sure to leave 127.0.0.1 localhost or you'll break stuff.

    You have to be root to edit the file, so do something like:

    Code:
    sudo gedit /etc/hosts
    Last edited by atreyu; 01-06-2012 at 03:10 AM. Reason: bold loopback entry

  3. #3
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Dover, DE
    Posts
    112
    My ip addresses are assigned buy dhcp and I do not want to make them static. There are many devices in my home. Even if I did edit the hosts file on all my linux boxes that wouldn't solve the whole network. I need to know how to make name resolution work within my network.

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Who controls the DHCP server? If you do, I believe you can configure what hostname the clients get set to.

    Or you can run a bind name server.

Posting Permissions

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