1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Don't understand why hosts file resolves hostname -> IP and not netbios -> IP

Discussion in 'MCDST' started by beaumontdvd, Jan 18, 2010.

  1. beaumontdvd

    beaumontdvd Kilobyte Poster

    487
    3
    32
    Hi all, sorry if its a stupid question. I understand the concepts of the hostfile converting the hostname (Full computer name) to IP but why does it have to convert the hostname and not the netbios name (abbreviated computer name)

    But then why does WINS convert netbios name to IP. Is it just a process of the computer needs something to convert the netbios name and the hostname?

    Please help :(

    Thanks anyone that has replied!

    Dave
     
    Certifications: 070-271, 070-272, (MCDST)Level 1,2,3 NVQ
    WIP: 070-270, A+, N+, S+,MCDST 7 Upgrade
  2. Danshand

    Danshand Nibble Poster

    51
    2
    24
    The hosts file is for converting fully qualified domain names to an IP. There is another file named lmhosts which is used for converting NetBios names. Netbios names are a single named identifier, such as you may have a computer on your network named COMPUTER01. If you are using NetBios/WINS then they can identify that computer by the name COMPUTER01. However in more common networking the computer would need fully qualified domain name, such as COMPUTER01.YOURNETWORK.LOCAL.
    This is to do with DNS and the internet.

    See http://www.tek-tips.com/faqs.cfm?fid=807 for more info.
     
    Certifications: Many.
    WIP: MCITP, ITIL
  3. Qs

    Qs Semi-Honorary Member Gold Member

    3,081
    70
    171
    I think you're getting confused. The PC will have TWO files, one for DNS names -> IP (HOSTS), and one for NETBIOS names -> IP (LMHOSTS)

    • The HOSTS file provides a static method for resolving hostnames to IP addresses (much the same as DNS)

    • The LMHOSTS file provides a similar function, but is used for NETBIOS name resolution (much the same as WINS). This method is used more for legacy purposes / small networks.

    Both files are generally used as failovers when a DNS/WINS server is not available, as they have to be manually updated in order to provide comms between multiple devices (which is a pain.)

    Qs
     
    Last edited: Jan 18, 2010
    Certifications: MCT, MCSE: Private Cloud, MCSA (2008), MCITP: EA, MCITP: SA, MCSE: 2003, MCSA: 2003, MCITP: EDA7, MCITP: EDST7, MCITP: EST Vista, MCTS: Exh 2010, MCTS:ServerVirt, MCTS: SCCM07 & SCCM2012, MCTS: SCOM07, MCTS: Win7Conf, MCTS: VistaConf, MCDST, MCP, MBCS, HND: Applied IT, ITIL v3: Foundation, CCA
  4. beaumontdvd

    beaumontdvd Kilobyte Poster

    487
    3
    32
    Thanks, that makes it easier. But, why does both the NETBIOS and HOSTNAME need to be transferred to IP addresses. I know the computer can only communicate through IP addresses. But why cant it just transfer the hostname(Full computer name) to IP. why is there an extra need for the LMHOST file to transfer the netbios name too.?

    Regards,
     
    Certifications: 070-271, 070-272, (MCDST)Level 1,2,3 NVQ
    WIP: 070-270, A+, N+, S+,MCDST 7 Upgrade
  5. Danshand

    Danshand Nibble Poster

    51
    2
    24
    Its one or the other. Some old applications may only be able to use NetBios, and therefore LMHOSTS or a WINS server will have to be queried. Microsoft Windows by default, will query using DNS, which has a series of steps to try and resolve a name. If a DNS answer cannot be found, Windows will then query NETBios, in a series of steps.

    Please see http://support.microsoft.com/kb/172218 for more information.
     
    Certifications: Many.
    WIP: MCITP, ITIL
  6. beaumontdvd

    beaumontdvd Kilobyte Poster

    487
    3
    32
    Thanks for your help, that makes learning it a lot easier. when you say applications do you mean applications or operating systems as I thought it was the operating system that had the lmhost file / host file.

    Regards, and thanks

    Dave
     
    Certifications: 070-271, 070-272, (MCDST)Level 1,2,3 NVQ
    WIP: 070-270, A+, N+, S+,MCDST 7 Upgrade
  7. danielno8

    danielno8 Gigabyte Poster

    1,305
    48
    92
    applications use the OS to do this.
     
    Certifications: CCENT, CCNA
    WIP: CCNP
  8. beaumontdvd

    beaumontdvd Kilobyte Poster

    487
    3
    32
    Oh right thanks,

    Dave
     
    Certifications: 070-271, 070-272, (MCDST)Level 1,2,3 NVQ
    WIP: 070-270, A+, N+, S+,MCDST 7 Upgrade

Share This Page

Loading...