how to resolve names to IPs WITHOUT /etc/hosts or DNS
Linux - NetworkingThis 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.
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.
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?
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)
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.