Find the answer to your Linux question:
Results 1 to 4 of 4
On my home network I setup a Slackware 10.2 instance as a DHCP client to my cable modem and a DHCP server to my home network. I got the packet ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187

    Home network hostname resolutions


    On my home network I setup a Slackware 10.2 instance as a DHCP client to my cable modem and a DHCP server to my home network. I got the packet forwarding and DNS forwarding working, however, I can't ping my other local machines by their hostnames. I have to use IP addresses for everything. How can I setup my network so I can use hostnames instead of IPs on my local network? I'm using the 192.168.5.0 range. When I'm plugged into my old dlink router all the hostnames work.

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134

    Thumbs up

    The simplest way to do it, if you only have a small
    number of hosts, is to edit the /etc/hosts file on each
    computer.

    Code:
    #
    # hosts		This file describes a number of hostname-to-address
    #		mappings for the TCP/IP subsystem.  It is mostly
    #		used at boot time, when no name servers are running.
    #		On small systems, this file can be used instead of a
    #		"named" name server.  Just add the names, addresses
    #		and any aliases to this file...
    #
    # By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
    # should NEVER be named with the name of the machine.  It causes problems
    # for some (stupid) programs, irc and reputedly talk. :^)
    #
    
    # For loopbacking.
    127.0.0.1		  localhost
    192.168.1.5	        blue.localdomain        blue
    192.168.1.2		coffee.localdomain    coffee
    192.168.1.3		genius.localdomain    genius
    192.168.1.4		moron.localdomain    moron
    192.168.1.6		rcgreen.localdomain  rcgreen
    # End of hosts.
    List the adderss if each host, and its hostname

    Also make sure that /etc/host.conf has a line that says

    Code:
    order hosts, bind
    On Windows machines the hosts file is usually in C:\WINDOWS\SYSTEM32\DRIVERS\ETC, and there
    is no host.conf

  3. #3
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    If I setup my slackware box as a DNS server too, isn't there a way that the DHCP server can interface with the DNS server to automatically add hostnames and IPs? If someone else hooks up a laptop, I don't want to have to add their IP/hostname to all my servers manually.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    Has anyone gotten their DHCP server to automatically update a DNS 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
  •