Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-12-2001, 01:56 AM
|
#1
|
Member
Registered: Aug 2001
Posts: 77
Rep:
|
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.
|
|
|
11-12-2001, 09:39 AM
|
#2
|
Member
Registered: May 2001
Location: Baltimore,MD,USA,Earth,Some Galaxy, We haven't gone that far!
Distribution: Redhat 7.3
Posts: 104
Rep:
|
I'm not quite sure, but I guess WINS server works for this purpose on a private LAN.
|
|
|
11-12-2001, 04:52 PM
|
#3
|
Member
Registered: Oct 2001
Distribution: red hat 7
Posts: 58
Rep:
|
wins as mentioned by Stingreen. or via a lmhosts file, if setting up a wins server is out of the question.
|
|
|
11-12-2001, 05:37 PM
|
#4
|
Member
Registered: Aug 2001
Posts: 77
Original Poster
Rep:
|
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.
|
|
|
11-12-2001, 05:57 PM
|
#5
|
Member
Registered: Oct 2001
Distribution: red hat 7
Posts: 58
Rep:
|
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)
|
|
|
11-12-2001, 05:58 PM
|
#6
|
Member
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52
Rep:
|
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.
|
|
|
11-12-2001, 07:10 PM
|
#7
|
Member
Registered: Nov 2001
Location: Kansas
Distribution: rh71/2, mandrake81
Posts: 53
Rep:
|
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
|
|
|
11-12-2001, 10:30 PM
|
#8
|
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:
|
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.
|
|
|
11-13-2001, 02:19 AM
|
#9
|
Member
Registered: Oct 2001
Distribution: red hat 7
Posts: 58
Rep:
|
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.
|
|
|
11-13-2001, 02:52 AM
|
#10
|
Member
Registered: Aug 2001
Posts: 77
Original Poster
Rep:
|
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.
|
|
|
11-13-2001, 08:33 AM
|
#11
|
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:
|
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.
|
|
|
11-13-2001, 11:32 PM
|
#12
|
Member
Registered: Aug 2001
Posts: 77
Original Poster
Rep:
|
So it seems almost unanimous.
Without DNS or a protocol like SMB you cannot do name resolving with dynamic IPs.
Thanks all!
|
|
|
All times are GMT -5. The time now is 11:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|