Giving IP's hostnames?

Discussion in 'Networking and Computer Security' started by Surge1989, Feb 19, 2008.

  1. Surge1989

    Surge1989 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Does anyone know how to give a LAN IP a hostname?
     
  2. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    You can only assign host names to nodes, such as computers and routers. An IP address is only used to let a node join a network. Just like having a phone number. So you can't assign a host name to an IP address.
     
  3. Surge1989

    Surge1989 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Opps, thats kidna what I meant, So how can I give say my laptop and desktop hostname? or give my router a hostname?
     
  4. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    You have a hosts file on windows machines, that stores ip addresses and hostnames, for example something like:
    192.168.1.9 laptop1

    I believe editing this file on each machine will do this.
     
  5. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    Right-click on My Computer and go to Properties. At the tab Computer Name, you can change your hostname (computer name). Setting a hostname on a router depends on what brand and type. You could consult your user manual.

    Do remember that each node on the same network needs a different hostname.

    No, the HOSTS file is used when a network doesn't have a DNS server. You can link a (domain) name to an ip address. For example, if you got a webserver inside your network with the address 192.168.1.50. You can add the line 192.168.1.50 webserver to the HOSTS file in each PC. So if you enter WEBSERVER in the browser, it gets resolved to the corresponding IP address. However, the HOSTS file is almost not used anymore because it's replaced by DNS servers and it's very decentralised because a change needs to be saved in the HOSTS file of all PCs.
     
  6. Surge1989

    Surge1989 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the replies, I just found the host name tool thing in Ubuntu =] Will look in windows later, thanks
     
  7. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    Yes, you can. It's called DNS. If a node happens to have an IP, and the IP has an A-record, then that node is resolvable via DNS, right? :) But if an IP has a host record, and there's no PC listening at the IP, DNS still works. It just won't take you anywhere. Domain name system - Wikipedia, the free encyclopedia
     
  8. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    Then it's called a domain name, instead of a host name :)
     
  9. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    Sorry, didn't mean to come off so strong. But no, host name is a synonym for a DNS A-record, so it's an acceptable substitution. "Host record" and "A-record" mean the same thing.
     
  10. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    I think I confused Hostname with Computer Name...:doh:
     

Share This Page