Hostname Resolution

36
© N. Ganesan, Ph.D., All rights reserved. CHAPTER Host Name Resolution DNS and WINS

Transcript of Hostname Resolution

Page 1: Hostname Resolution

© N. Ganesan, Ph.D., All

rights reserved.

CHAPTER

Host Name ResolutionDNS and WINS

Page 2: Hostname Resolution

Chapter Objectives

• Explain the process of hostname resolution to IP address on the Internet

• Describe the purpose of the HOSTS, LMHOSTS files

• Show how the HOSTS and LMHOSTS file could be modified to resolve abbreviated names to IP addresses

Page 3: Hostname Resolution

© N. Ganesan, Ph.D., All

rights reserved.

Module

Host Name Resolution Process

Page 4: Hostname Resolution

Name Resolution

• Resolve names to IP addresses and vice versa– www.calstatela.edu <-> 130.182.1.60

• Names– TCP/IP host names– WINS names a.k.a. NetBIOS names

Page 5: Hostname Resolution

Finding an IP Address of a Domain

• ping www.ganesan.com• tracert www.ganesan.com

– Shows the number of hops to the destination

Page 6: Hostname Resolution

TCP/IP Host

Name Example

Page 7: Hostname Resolution

WINS or NetBIOS

Names

Page 8: Hostname Resolution

Current Computer Names

• Only the TCP/IP host name is currently in widespread use

• The Windows based name or the NetBIOS name as it is known is not widely used anymore – This may be retained for compatibility

with older systems

Page 9: Hostname Resolution

Internet Host Names

.com .edu .org Etc.

ganesan.com

courses.ganesan.com

A unique identifier known as theFully Qualified Domain Name (FQDN)

Page 10: Hostname Resolution

Internet Host Name Resolution

• First, a local file known as HOSTS is checked to resolve the name to an IP address

• If a corresponding entry is not found in the HOST file, the information is transmitted to a DNS server for name resolution

• A cascade of DNS servers at different locations may get involved in the resolution process

Page 11: Hostname Resolution

End of Module

Page 12: Hostname Resolution

© N. Ganesan, Ph.D., All

rights reserved.

Module

Hosts File

Page 13: Hostname Resolution

Sample HOSTS File

Page 14: Hostname Resolution

Sample Entry in the HOSTS File

Page 15: Hostname Resolution

Host Name Resolution Example

Page 16: Hostname Resolution

HOSTS File

• HOSTS file location– C:\Windows in Windows 9x– C:\WINNT\system32\drivers\etc in Windows NT– C:\Windows\system32\drivers\etc in Windows XP

• The file could be searched as well • The extension of the file may be .SAM• Note:

– Store the file as “HOSTS” after modification with Notepad to avoid it being given a Notepad file extension

Page 17: Hostname Resolution

Redirection to DNS

• If there are no entries in the HOSTS file, the request is redirected to a DNS on the network

• Multiple DNSs may have to be consulted before the name is mapped to an IP address

• Domain names must also be registered with InterNIC or a similar organization

Page 18: Hostname Resolution

DNS Perspective of Name Resolution

courses.ganesan.com

.com root domainpoints to the DNS serverAt Pacbell

Pacbell DNSserver pointsto the DNSserver at

Ganesan.com

DNS server at ganesan.comlocates the

host “course”

Page 19: Hostname Resolution

Domain Name Hosting: Another Example

courses.ganesan.com

InterNICpoints to the DNS server

at ganesan.com

DNS server at ganesan.comlocates the

host “course”

Page 20: Hostname Resolution

End of Module

Page 21: Hostname Resolution

© N. Ganesan, Ph.D., All

rights reserved.

Module

LMHOST File

Page 22: Hostname Resolution

Windows or NetBIOS Names

kumarnanda

ganesanDomain

Page 23: Hostname Resolution

Uniform Naming Convention (UNC)

• Applies to finding a resource on a local network• \\windowsname\folder\file• An example of windowsname could be a server

name• \\kumar\sales\annual.doc• Note: FQDN applies to the Internet where a

website, for example, is located using this name • Find the FQDN of your computer, if it is

connected to the Internet

Page 24: Hostname Resolution

Windows Name Resolution

• First a local file known as LMHOSTS is checked to resolve the name to an IP

• If a corresponding entry is not found in the HOST file, the information is transmitted to a WINS server for name resolution

• WINS– Windows Internet Name Service

Page 25: Hostname Resolution

Sample Partial LMHOSTS File

Inclusion of lmhosts files from other computers.

Page 26: Hostname Resolution

Sample Entry in LM HOSTS File

Page 27: Hostname Resolution

Intranet Example

kumarnanda

ganesanDomain

Internet

Web Server

Page 28: Hostname Resolution

NetBIOS Name Resolution with LMHOSTS Entry

Page 29: Hostname Resolution

Access Path with LMHOSTS Entry

kumarnanda

ganesan

Internet

Web Server

Access Client

Page 30: Hostname Resolution

NetBIOS Name Resolution without LMHOSTS Entry

IE5 searches for a web address matchand substitutes www.ganesan.com

Page 31: Hostname Resolution

Access Path without LMHOSTS Entry

kumarnanda

ganesan

Internet

Web Server

Access Client

Access is through the Internet.

Page 32: Hostname Resolution

IE5 Search for Web Address Match

Page 33: Hostname Resolution

LMHOSTS File

• LMHOSTS file location– C:\Windows in Windows 9x– C:\WINNT\system32\drivers\etc– C:\Windows\system32\drivers\etc

• The extension of the file is .SAM• Note:

– Store the file as “LMHOSTS” after modification with Notepad to avoid it being given a Notepad file extension

Page 34: Hostname Resolution

Redirection to WINS

• If there are no entries in the LMHOSTS file, the request is redirected to a WINS server on the network

• In the last example, there was no WINS server on the LAN– Therefore, IE5 serarched for a web

matching web address

Page 35: Hostname Resolution

WINS Perspective of Name Resolution

courses.ganesan.com

InterNICpoints to the DNS serverAt Pacbell

Pacbell DNSserver pointsto the DNSserver at

Ganesan.com

DNS server at ganesan.comlocates the

host “course”

Page 36: Hostname Resolution

© N. Ganesan, Ph.D., All

rights reserved.

End of Module

End of Chapter