2 mandrake linux boxes see everything but each other
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.
2 mandrake linux boxes see everything but each other
I finally got samba working between my linux box and my folks' windows machines -- they saw each other, linux mounted windows shares on boot, everything. It was nice.
Then, I started up my other linux box and tried to set it up the same way. They both still have internet access, and windows can access shares from both. The linux boxes can't see anything by hostname. I can ping and mount by the local ip's of any machine on the network, but the only hostname each linux box can resolve is its own (most of the time they can, at least). nmblookup fails from the linux machines for everything but their own names. LinNeighborhood and Gnomba can see the workgroup and the names of the computers in it but can't browse/open anything. Neither is really what you would call a server, but is that the right direction? Why is there a problem now that I've added the second Linux machine?
Your going to have to describe your network a bit better. Are your /etc/hosts configured correctly? Do you have listings for each machine in both? Are your IPs static? Using a router? IP Masquerade? We need more info...
I didn't have to do any of that with just one Linux machine, so please forgive me for being so clueless.
Originally, the network had a Linksys router linking winxp, win98se, win2000, and only 1 Mandrake 9.0, all working perfectly (Samba 2.2). Adding another Linux machine to the network 'caused' the first to stop seeing any other computers on the network, though windoze can see both Linux machines and everyone has internet access. What's wrong now is that the Linux machines can't put local IP's and hostnames together. Though the problem began when I added a second machine, it doesn't go away when I shut one of them off.
In general, the IP's are all dhcp. I've also worked with both my Linux machines with static IP's (no difference), but I'd really rather avoid the hassle of setting up all the windoze comp's with static IP's as well.
I've never heard of IP Masquerade so I hope I can assume I'm not using it.
The /etc/hosts file only contains the loopback and the IP/hostname for the machine it's on. resolv.conf contains:
I don't know what the second two are about; they don't match anything I recognize or find on the router. I tried adding a line -nameserver 'routerip'- but it didn't seem to make a difference.
Both of the Linux machines are set up Exactly the same, with only names and IP's different. Is that a problem? Do they somehow conflict with each other? Neither is on all the time, and in fact both are dual boot with a version of windoze. Why did I break it by just adding another Linux box? I had somehow decided that it should be simpler than the 3 days I spent getting Linux and windoze to speak. If it works, some of the windoze machines could even be replaced with Linux -- so I'm a little desperate. ; )
Again, ping and mount work for IP's but not hostnames, and nmblookup fails. smbclient fails for hostname and with IP seems to work fine, showing all the computers by name (under the "server" column) as well as the proper shares for the 'named' computer. The last line shows the proper workgroup name and a master--what does that mean? That's why I'm worried about both the Linux machines being the 'same.'
* EDIT: I forgot to ask, why does nmblookup respond with, "querying <hostname> on x.x.x.255" when the router is at x.x.x.1 ? What is that ip? I don't know myself of anything here with the 255 ip, and all the computers have ip's less than 115. The router doesn't show the names of the win98 or Linux machines anyway. *
Anyway, sorry for being an idiot. Thanks for your time.
OK, well you're going to want to add each computer on the network to each /etc/hosts so they know each other's hostnames. That's why you can only reach them by ip. Something along the lines of:
These would be your ISP's nameservers I would assume, usually they are written to the file by DHCP.
If you want a good general reference to networking under linux I suggest you give the Network Administrators Guide a gander. It will help to answer a lot of your questions: http://www.tldp.org/LDP/nag2/index.html
PS, don't apoligize, that's why you're here right?
For now, though: I edited the hosts file; it now contains the loopback and its own ip/hostname as well as one windoze computer on the network. nmblookup still fails even after rebooting, but smbclient and smb:// both work by that hostname. Why does nmblookup respond with "querying <hostname> on x.x.x.255"? What is the ip supposed to mean? Is nmblookup supposed to work now? The router is at .1 and all the computers are at less than 115. Oh, well.
With this fix, do I have to check and update the hosts file (and restart samba?) every time I start up, or is there a way around this (without setting up static ips everywhere...)? I keep thinking there should be because the first Linux machine worked properly without it.
* EDIT: by the way, ifconfig does show that x.x.x.255 address under broadcast. How do I know if that's correct, and is it something you can change? Apparently, not everything looks there for hostnames since nmblookup is the only (?) one that hasn't figured it out. *
I have to admit I don't know jack about Samba, I can only help with your networking. If you can ping each other by hostname you should be a step closer to figuring this out.
No, you cannot change the broadcast address. The number is used when your machine wants to send a packet to the entire network. It is analogous to yelling out in a crowded room..." hey where's joe?" instead of asking every single person..."hey, are you joe?" I think (but am not certain) that this is what your box is doing when it says: "querying <hostname> on x.x.x.255". The number is determined by setting the device section of your ip address to '255', so if your ip is 192.168.0.2 your broadcast address is 192.168.0.255
The guide can explain this a lot better than me though....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.