Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Able to Ping host names without DNS installed, how is it working? 2

Status
Not open for further replies.

sman26

Vendor
Jan 13, 2005
36
US
Probably a simple question for most...
I have a small SOHO setup.
Cable Modem --> D-Link Router --> 2 PCs networked together using TCP/IP
I am just curious how it is letting me ping from one PC to the other by using the HOST name of the PC. I know pinging the IP should work but how can it ping the HOST name? How is this possible since I don't have a DNS server running and I haven't modified the HOSTS file to tell the PCs that this HOST name is tied to this IP address.
Does it have something to do with NetBIOS?
Thanks...just wanted to know how it works under the hood.
Sman
 
That's because they are in the same network---they never have to go across the router, all layer 2. Is this what you're asking, or where the pc's get the dns names from? Are you sure they're not in etc/hosts?

Burt
 
Thanks burtsbees,

I guess my questions is how am I able to ping another pc in the network by its PC name if I don't have a DNS server in the network telling it that this hostname goes with this IP address?
Is this something with NetBIOS which runs by default so when the PC broadcasts out that it's looking for a PC names "PC1234" then "PC1234" on the wire hears this and responds?
Am I even explaining NetBIOS correctly if that how this is working. Or is this just my cheap Netgear router that has a crude DNS server built in (i don't think it does) which resolves hostnames to IP addresses?
Thank again for your time.
Sman
 
Is this something with NetBIOS which runs by default so when the PC broadcasts out that it's looking for a PC names "PC1234" then "PC1234" on the wire hears this and responds?

Yes. All pc's in the same network hear the broadcasts.

Burt
 
Thanks.
So basically in a small LAN, within the same subnet, if you don't plan to get out to the INTERNET then NetBIOS is all you need to resolve hostnames to IPs of PCs.
If you are in a large LAN and don't want all the broadcast out there on there then DNS is better because it it unicast to the DNS adn DNS comes back with were to find the PC at with that IP.
DNS uses a Forward lookup zone to resolve names to IP addresses and NetBIOS just uses broadcast out to PCs and the correct PC that matches the hostname request comes back with a response? Does that sound correct?
sman
 
Yes, for the most part. But I think your main misunderstanding is the difference between layer 2 and layer 3, and what happens, specifically collision domains, broadcast domains, and the simple fact that everything on the same subnet is all layer two (data link) communication (switching), and not routing. Routing is what separates subnets, and therefor broadcast domains, and therefor the need for an external (or centralized) DNS server.

Burt
 
Just to add more to Burts post, when a LAN/WAN is running multiple subnets (Layer 3) and PC NETBIOS name resolution is required, a WINS server must be used.

NETBIOS broadcasts its name and ip out to its network(subnet). Since a broadcast packet cannot be routed a WINS server is put into place to store a master database of all network computers IP and NETBIOS name so that all workstations from each of the differnt subnets can talk to each other.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top