LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux hostname on a Windows network doesn't work (https://www.linuxquestions.org/questions/linux-networking-3/linux-hostname-on-a-windows-network-doesnt-work-81317/)

lynnwgnr 08-12-2003 12:10 PM

Linux hostname on a Windows network doesn't work
 
Summary: I cannot refer to my Linux machine by its hostname from other PCs on a corporate Windows 2000 network (but it can be referred to okay when booted up as Windows ME).

I work in a Windows-centric environment where all the servers are Windows 2000. All client PCs are Windows XP, 98 or ME. The administrators are unfamiliar with, and unsympathetic to all other OSes.

I am trying to set up a Red Hat web server to justify the use of Linux/Apache as a web server when Windows 2000/IIS goes down/gets defaced :)

I set up a spare PC so it can boot either Windows ME or Red Hat 7.2. The Red Hat 7.2 is a complete/everything install. In Windows ME, I set up the computer to use DHCP and gave a computer name of "mordor" and a workgroup "midgard". I really do not have to use the official domain name unless I need Exchange and file server access. As Windows ME, the PC can be pinged by other Windows PCs on the network using simply "mordor" although pinging with its automatically-assigned IP of 10.1.7.10 works too.

When I boot up that same spare PC using its Red Hat 7.2 partition, I can access it using simply "mordor" for a little while. By "access," I mean using another Windows PC's ping, Putty/SSH and IE (i.e. "mordor" in the IE address line to get the Apache test page). By '"a little while" I mean about 10 minutes, then ping, SSH, and IE using "mordor" says something like host not found. Switching to using IP number (10.1.7.10) access, however, continues to work fine.

Now, in Red Hat 7.2, it makes no difference whether I set networking up as needing to use DHCP or manually assigning a fixed IP (10.1.7.10) -- in both cases, it behaves exactly as I have described above. I set networking up using the KDE GUI: Control Panel > Networking. I used a hostname of "mordor" too.

Somehow it feels as if Windows ME would "update" the network DNS somehow with the computer name, while Red Hat on the other hand isn't doing it with its hostname (the one in /etc/sysconfig/network).

Can anyone help? Has this anything to do with Dynamic DNS (DDNS)? Or needing to set up Samba on Red Hat?

P.S. I tried it with Red Hat 9 (GUI) and the same thing happened. I prefer Red Hat 7.2 only because it needed half the disk space for an "everything" installation.

Thanks in advance!

redhawk1973 08-12-2003 12:49 PM

Input the name in the Wins server or the DNS server

FirebirdV0273 08-12-2003 01:02 PM

yeah, linux and windows networking don't work the same way. windows networking tries to make it easy for home users and sysadmins. that's why you have things like the (very simple to use) name addressing and at the same time workgroups. putting the name into the DNS server would cause it to work just the same as the windows way, so do that.

JRandom 08-12-2003 01:07 PM

Hello,

Sounds like a WINS name resolution problem to me. As I understand Windows, NT-lke systems use a naming protocol (WINS) to locate workgroup/domain members by their name. In my experience this nami resolution extends to other applications like SSH, IE, etc. It sounds like the other computers are storing your WINS name in a cache, and then deleting it after a set period of time. Try installing Samba, and make sure that the following lines are in there somewhere:

workgroup = midgard
netbios name = mordor
wins server = w.x.y.z (I'd try the PDC's IP address on this one)

Fire up samba (/etc/rc.d/init.d/smb start or something similar) and see what happens. It may be a good idea to let a few minutes pass so that the Linux box will register itself with the WINS server.

--Eric

lynnwgnr 08-12-2003 06:22 PM

Thanks, everyone. Setting up Samba worked! Here's what I did:

1. Renamed /etc/samba/smb.conf to something else
2. Created a brand new /etc/samba/smb.conf containing just 4 lines:
[global]
workgroup = midgard
netbios name = mordor
encrypt passwords = yes
3. Started Samba from the KDE desktop's Control Panel > Service Configuration > smb (of course using the command line mentioned in prior post works too, but here I can checkmark it to auto-start each time Red Hat starts).

And now when I ping, Putty/SSH, or browse from IE using another PC on the network, I only need to use "mordor" instead of the IP 10.1.7.10

Thanks!!!


All times are GMT -5. The time now is 03:45 AM.