LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-25-2005, 12:32 AM   #1
uthe54
LQ Newbie
 
Registered: Aug 2005
Location: Oklahoma City, OK
Distribution: Fedora Core 4
Posts: 3

Rep: Reputation: 0
Linux Hostname across Subnets


Hi all!

I attend a University where all the buildings are in different subnets. I have two linux fedora core 4 servers, one called 'ocug' and one called 'polo'. polo is my file server, and ocug is my icecast server.

As it is now, for some reason, when polo boots up, I guess it registers its name with active directory when it does dhcp. whereas, ocug doesnt do that. ocug and polo both run samba and have their NetBIOS names set. So anywhere in my building I can hit ocug by hostname, but I cant once I leave the building, like I can with polo.

According to all my research, I should just be able to type 'hostname ocug' and it will work, but that doesnt do the trick.

Over the summer, I wrote my whole ocug website in PHP, so it is necessary that the hostname registers all through campus, so that when the DJ's start doing their shows, people in all the dorms can listen.

Any help would be apriciated!
 
Old 08-25-2005, 08:58 PM   #2
DaveG
Member
 
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
The Linux hostname is usually set during the boot process. Most DHCP implementations don't change it when they get an IP lease. The DHCP server _may_ register the name with a DNS server.

It sounds like the problem is with name to IP address translation. You'll need to find out how this is set up on each subnet: /etc/hosts files or DNS.

Assuming DNS, things probalby work within a subnet because the machines use a default network name, the local subnet, and silently add it to the hostname when looking for the information. This will not work from another subnet as it will append a different network name. So, for "pure" (linux) IP, make sure to use the "fully qualified domain name" (fqdn) for the server, e.g. ocug.whatever.edu and polo.otherplace.edu.

For the NetBIOS stuff, it's all different. The "last resort" for name translation is a broadcast message that will not be allowed out of the local subnet, so you will only "see" local machines. I'm not sure what the solution is for this. Try using the fqdn for NetBIOS. If that doesn't work, you may need to check in to WINS name resolution in Samba.
 
Old 08-26-2005, 02:24 AM   #3
uthe54
LQ Newbie
 
Registered: Aug 2005
Location: Oklahoma City, OK
Distribution: Fedora Core 4
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply DaveG

I am not sure if I understand you fully.

Here on campus, when a windows PC turns on, its name is then registered somewhere so that everyone on campus can see that computer by computer name, not just by IP. Is this what a WINS server does? On my windows XP PC, if I do an 'ipconfig /all' it returns a primary and secondary wins server, does this have anything to do with anything? is there a way I can setup my linux machine to register its name their? And if I could, then will it work for all the computers on campus?

My University is all done with Windows servers. The only Linux server is in the Computer Science building for the computer science majors to play with. So I imagine all the DHCP servers run Windows Server OS too.

Thanks for any help!
 
Old 08-26-2005, 08:15 AM   #4
DaveG
Member
 
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
I believe Windows servers run a combined DHCP and DNS service. On boot, each machine will ask for an IP lease using the configured machine name. The server takes care of making that name available using DNS and WINS to support IP and NetBIOS name handling.

For Windows clients, the DNS and WINS names are the same, but they could be differnet for Samba on linux. The Linux host name is set in /etc/sysconfig/network and the WINS name in /etc/samba/smb.conf. Just set them the same.

Samba on Linux can be configured to operate just like a Windows NT4 server, WINS name registration, the works. Check the configuration of Samba on each machine, particularly:
[global]
netbios name
workgroup
wins support
security

Check the "Samba-3 by Example" document included in the Samba package for configuration examples.
 
Old 08-28-2005, 09:09 PM   #5
uthe54
LQ Newbie
 
Registered: Aug 2005
Location: Oklahoma City, OK
Distribution: Fedora Core 4
Posts: 3

Original Poster
Rep: Reputation: 0
OK, Thanks! Sorry about the lag in responce, but it all worked out. My WINS server line was commented out. I just uncommented it and added our WINS server IP, and now it works great! Thanks for the help. I bet its still not listed on Active Directory, but the machines can now hit it by its name, which is all I really care about.

Thanks again DaveG
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Hostname resolution, etc... nex6 Linux - Enterprise 2 12-28-2004 03:28 PM
linux can't resolve hostname from another linux box bricox Linux - Networking 4 07-07-2004 07:24 AM
linux hostname Red Squirrel Linux - Networking 11 02-18-2004 06:58 PM
Get IP by Hostname in Linux Network codecruncher Linux - Networking 7 09-07-2003 11:48 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration