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.
i have a linux box named ximian, but on my network from a different machine, can't just type "ping ximian" , have to put in my machine's ip such as "ping 192.168.1.10".
How to fix it so my machine name will match the ip (if that's the correct way to put it)? I ready tried to edit /etc/sysconfig/network, didn't seem to work
your hostname - ip resolution is host dependent and machine dependent you can edit the hosts file (win2k + or lin) in etc/hosts and a line to resolve it, or setup the networds host to resolve the name correctly..
Originally posted by miaviator278 your hostname - ip resolution is host dependent and machine dependent you can edit the hosts file (win2k + or lin) in etc/hosts and a line to resolve it, or setup the networds host to resolve the name correctly..
I'm pretty sure the original poster is going
Ok, well, I am.
No scratchy heads allowed!
What he said was, you need to edit the hosts file to include the machine name and related ip addrress. That is true in Windows or Linux when you don't have a dns or wins server to do it for you.
If the other machine is a Linux box, edit the /etc/hosts file. For example....
127.0.0.1 localhost.localdomain localhost
192.168.0.1 computer1.workgroup computer1
192.168.0.2 computer2.workgroup computer2
If the other computer is a Windows box, edit the hosts file which can be located differently depending on the version of Windows. The easiest thing to do is search for hosts and open it up with notepad from the search results unless you know exactly where it is.
For example......
127.0.0.1 localhost
192.168.0.1 computer1.workgroup
192.168.0.2 computer2.workgroup
Make sure to save that as a plain hosts file with no extensions by enclosing the name in quotes..... "hosts"
i was wondering the same thing. my question is...on my home lan, i don't have to edit any hosts files or anything, but my windows machines automatically resolve the names. why won't my linux machines do it?
at work, the linux machines automatically seem to resolve hostnames for windows machines, but i can't ping one linux machine from another by typing "ping <HOSTNAME>". none of it makes sense to me...
Mugatu, is your win2k boxes using linux as your dns servers? if so, there's your answer. At work, it depends where the linux boxes are pointing to dns wise. (/etc/resolv.conf) If it's a windows domain, your Domain Controller (DC) is probably the DNS server as well and has the names of all your workstations on it. The linux machines probably aren't part of the domain so the DC has no knowledge of what the hostnames of the linux servers are.
There's multiple answers as to why, but there's a few possbilities.
miaviator278, Greetings from Operation: Enduring Freedom. I'll hit the other major operation in the fall. Oohrah, Marine Corps.
Originally posted by Mugatu i was wondering the same thing. my question is...on my home lan, i don't have to edit any hosts files or anything, but my windows machines automatically resolve the names. why won't my linux machines do it?
at work, the linux machines automatically seem to resolve hostnames for windows machines, but i can't ping one linux machine from another by typing "ping <HOSTNAME>". none of it makes sense to me...
im in the same boat. take two winxp boxes, network them together (no dns/wins hosts edit) and they can ping each other by machine name.
put a lin box and and a winbox together, and they can only ping by IP address.
I've figured out how to get the windows box to ping the linux box by machine name. With samba, you can set up a netbios name (edit smb.conf, add netbios name = yourcomputername, and restart samba).
I still can't ping my windows box by machine name from linux though.
Does linux simply not work with netbios broadcasts? Do you HAVE to set up WINS or DNS, or edit the hosts file? It seems odd that you can give your box a netbios name through samba, but you can't see other netbios names without a wins server.
Same thing here.
At home I have two Linux boxes connected to the network of my company that uses a Win2K domain controller (dchp & dns).
The difficulty is that I'm not allowed to join the domain of my company's network. Other linux boxes on the company network that are in the domain are added to the dns by the domain controller.
I really don't want to edit /etc/hosts because I think that's a workaround, not a solution.
The best solution would be to make dig and host (and nslookup) to use wins (when configured). I'd do it myself if I knew how....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.