LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2001, 12:56 AM   #1
iggymac
Member
 
Registered: Aug 2001
Posts: 77

Rep: Reputation: 15
how to resolve names to IPs WITHOUT /etc/hosts or DNS


(This is somewhat similar to another thread I have going currently here. So my apologies.)

A windows user I know tells me that there is a way to resolve names to IP addresses on a private LAN without using a hosts file or setting up a DNS server (using only tcp/ip and not smb or other protocols).

Is this possible? He says it has to do with tcp/ip broadcasting, but to my limited knowledge tcp/ip has to use DNS to resolve names (or have a hosts file).

Is he talking about NetBios over tcp/ip and doesn't realize it? Or am I confused?

Thanks.
 
Old 11-12-2001, 08:39 AM   #2
Stingreen
Member
 
Registered: May 2001
Location: Baltimore,MD,USA,Earth,Some Galaxy, We haven't gone that far!
Distribution: Redhat 7.3
Posts: 104

Rep: Reputation: 15
I'm not quite sure, but I guess WINS server works for this purpose on a private LAN.
 
Old 11-12-2001, 03:52 PM   #3
lsof
Member
 
Registered: Oct 2001
Distribution: red hat 7
Posts: 58

Rep: Reputation: 15
wins as mentioned by Stingreen. or via a lmhosts file, if setting up a wins server is out of the question.
 
Old 11-12-2001, 04:37 PM   #4
iggymac
Member
 
Registered: Aug 2001
Posts: 77

Original Poster
Rep: Reputation: 15
Let me clarify:

How could you resolve names using tcp/ip ONLY and WITHOUT DNS or /etc/hosts files?

As in, how could you do this with Linux and Macs also?

Isn't WINS a Windows only, NetBios related thing?

Basically I have a Linux box and a Mac and have it set up with static ip's and using hosts files to resolve their names between themselves.

He tells me I can use broadcasting to do this if I want to switch to DHCP (I have a broadband router).

I say this cannot be done without a DNS server.

Does that make sense?

Thanks.
 
Old 11-12-2001, 04:57 PM   #5
lsof
Member
 
Registered: Oct 2001
Distribution: red hat 7
Posts: 58

Rep: Reputation: 15
sorry about that iggymac

"Isn't WINS a Windows only, NetBios related thing?"
yes on a m$ lan for netbios -> ip resolution.

the only other thing that springs 2 my mind on a local lan is:
Address Resolution Protocol (ARP)
 
Old 11-12-2001, 04:58 PM   #6
dangel
Member
 
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52

Rep: Reputation: 15
you r right iggy. you CAN'T do this in linux becuase it is a propietary protocol that windoze made. it works like this :
netbeui broadcasts a msg across the network screaming at the top of its lungs every 5 seconds "HEY!" "I'M OVER HERE!" "THIS IS MY IP AND ALL MY INFO" "I'LL EVEN GIVE YOU MY SHARED FILES"
lol
sorry. but its true. all you have to do is type in the unc and WHAM! your on their computer. hahaha
oh. so it has a password? use brute. el finisho.

imagine the bandwidth consumption on large network? think of older 10 mg hubs that don't seperate out the traffic between ports. blah! (alot of colleges still use this cause of $$ reasons)

hope this answers ur question.
 
Old 11-12-2001, 06:10 PM   #7
b0b0
Member
 
Registered: Nov 2001
Location: Kansas
Distribution: rh71/2, mandrake81
Posts: 53

Rep: Reputation: 15
There is no way that I know of to have name resolution with out DNS/WINS/host files. WINS/NetBIOS is not just Microsoft. My Linux machines that use Samba register with my NT server's WINS database.

As for ARP...it resolves IP addresses to MAC addresses (that 12 character hex that is hardcoded into you NIC and other network appliances).

General rule of thumb...
1) If you just have a couple of host (>10) keep a host file (unless you want to learn something cool...BIND!!)
2) If you have more, use an internal DNS server.

Later and have fun,
jason
 
Old 11-12-2001, 09:30 PM   #8
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
One of the previous posters is correct, Windows can use broadcasts to resolve hostnames.

Broadcasts are insecure, choke the network, and are not easily routed. However, they are not unique to Windows and are part of the SMB protocol standard and are therefore included with SAMBA.

Look in your SAMBA config file for a setting called "name resolve order". That is how you set the order in which SAMBA will attempt to resolve names. The "bcast" option is for broadcast.

Check the man pages for "nmblookup" for more info on testing this.
 
Old 11-13-2001, 01:19 AM   #9
lsof
Member
 
Registered: Oct 2001
Distribution: red hat 7
Posts: 58

Rep: Reputation: 15
Quote:
Originally posted by KevinJ
Broadcasts are insecure, choke the network, and are not easily routed. However, they are not unique to Windows and are part of the SMB protocol standard and are therefore included with SAMBA.
maybe i am wrong about reading iggy's original post, isn't he asking if this can be done "(using only tcp/ip and not smb or other protocols)."

the main purpose of wins is to avoid broadcasts providing u'r clients use the wins server.
 
Old 11-13-2001, 01:52 AM   #10
iggymac
Member
 
Registered: Aug 2001
Posts: 77

Original Poster
Rep: Reputation: 15
Yes, I was trying to fiugure out how to do this with tcp/ip only.

In a nutshell I have a this:

Linux Box
Mac
Broadband Router

Was using DHCP on router but had to change to static IPs (which I didn't want to do) because I thought that without a DNS server running on the Linux Box I would have to use hosts files.

My friend said there was another way and I was trying to verify that.

Is there a way I could resolve my host names while using DHCP assigned IPs WITHOUT setting up a DNS server?

That's the real question. Sorry if I wasn't clear.
 
Old 11-13-2001, 07:33 AM   #11
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
If you use SAMBA on the Linux box (I have no idea what you can do on a MAC) you can use the broadcast feature to resolve local hostnames.

If that option is not available on a Mac, then you will need DNS or Hosts. Those are the only options I know of.
 
Old 11-13-2001, 10:32 PM   #12
iggymac
Member
 
Registered: Aug 2001
Posts: 77

Original Poster
Rep: Reputation: 15
So it seems almost unanimous.

Without DNS or a protocol like SMB you cannot do name resolving with dynamic IPs.

Thanks all!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS, Linux doesnt resolve domain names for me ikk Linux - Networking 6 08-28-2005 03:35 PM
DNS, Linux doesnt resolve domain names for me ikk Linux - Newbie 6 08-28-2005 03:29 PM
DNS will not resolve non-domain qualified names arobinson74 Linux - Networking 2 10-25-2004 04:13 PM
Slow resolve of DNS names with DLink 504 ADSL router JGJones Linux - Networking 6 05-18-2004 06:02 PM
why do my client PCs need to enter the DNS of the ISP to resolve names? help kublador Linux - Networking 4 04-03-2003 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration