LinuxQuestions.org
Help answer threads with 0 replies.
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 02-21-2007, 09:19 PM   #1
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Rep: Reputation: 37
what is the use of the hostname on a home network?


-----------
quick posting topic disclaimer: I read the networking sticky and I wasn't sure if this belongs in networking or not. If not, my apologies - please move to the correct spot.
-----------

I have a home network with 2 Windows Comptuers, 2 Linux Boxen, and a BSD HTTP Server.

My BSD server's hostname was required to be its outside hostname as it is accesible via the outside. When my server used to be on Linux it didn't seem to care, but it matters on BSD. Fine - that's ok with me. So it's called server.ericsbinaryworld.com

My two linux boxes are called short-e.localdomain (for the small eMachine) and printman-ee.localdomain (for my print server). My MAIN question is, what does it matter what I call these boxen? They are not running HTTP, mySQL, etc. short-e is just my everyday desktop where I do my every day stuff. printman-ee is just running CUPSD, Samba daemon so that Windows can use the printer too, and an NFS daemon to share an external hard drive with short-e. If it matters, short-e is FC6 and printman-ee is Debian Etch.

Does it even matter if they are both on localdomain? Does that affect their ability to see each other?

Also, if I decided to change their names, does that affect smb, nfs, or cupsd? Let's say I decide today to change them to mario.mushroomkingdom and luigi.mushroom kingdom and then, two weeks from now, I decide that what I really love is HG2G and change it to fordprefect.hitchhiker and trilian.hitchhiker. Do I now have a lot of things to reconfigure?

Can I do something like ssh printman-ee.localdomain? It doesn't work now - what would I need to do to make it work? Do I need to run local DNS or something?

I know that was a ton of questions, but, try as I might today I couldn't think of a search term that would answer these questions. I got VERY, VERY close, but nothing seemed to be about the same questions I was asking.

Thanks in advance!
 
Old 02-21-2007, 10:00 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
In linux, 99% of the time the hostname means absolutely nothing. The only use I have found to it is knowing what box you're on in ssh. The only time that isn't true is with some mail programs. Some actually do use the "proper" host.domain name, which probably explains why some spam comes from localhost.localdomain. Apache is quite content to server any domain name you tell it to serve, and never care that its machine name is still localhost.localdomain.

I don't use printers at home or work, so I can't speak authoritatively about that, but samba identifies both the machine name and the windows network in the samba.conf file. Nfs designates the server by name or IP, but that isn't it's hostname, it is the FQDN, local hostname.domainname, IP, or a static entry in the /etc/hosts file.

The simple way to be able to issue a command like ssh printman-ee.localdomain would be simply to add printman-ee.localdomain or just printman-ee to the /etc/hosts file on the other boxes, assuming it has a constant IP address on your LAN. The other option is also good, but requires a bit more work, and that is to set up a local DNS server. If you don't have either static addresses on the machines or static maps for them in the DHCP device on your LAN, that would be a good way to go. You would need to setup BIND with ddns functions, and then if you simply add the line
Code:
search localdomain.com
nameserver local.dns.IP.address
to the top of your /etc/resolv.conf, asking for printman-ee will ask the local DNS, and that will return the LAN address of the host you asked for.

With only 3 *nix hosts I'd set them to static addresses and put those in each of their hosts files, but it would also be a good exercise to get BIND up and running. Then it is a multi-hour project rather than literally 5 minutes.

Peace,
JimBass
 
Old 02-22-2007, 05:16 AM   #3
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
Thanks for that. I think it mostly answers my questions. Just edit the hosts files (well, in Fedora I think they insist you use the GUI or it could get over-ridden) and they will be able to find each other. If I change the hostname - just change the host file. (I do have static IPs - static enough - the router always gives them the same IP address back)

For email programs that care, I use Thunderbird. I'm not sure/can't remember if sendmail is doing stuff in the background. It certainly may be doing stuff in the background for cron job emails. Do you think sendmail would barf if I changed the names?
 
Old 02-22-2007, 09:13 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Fedora is crap just for reasons like that. Insisting you use a GUI to edit a text file?

If sendmail is sending email to remote domains, you may need to reconfigure it once you chance the hostname. If it is just sending email to local accounts on itself, it is probably fine. Thunderbird is a client, I was speaking of mail servers. It could care less what your local hostname is.

You're welcome for the help.

Peace,
JimBass
 
Old 03-05-2007, 07:46 PM   #5
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
Epilogue:

On the linux side, everything worked just as it should. Changing the names had no deleterious effects. Windows, being Windows, had some problems with the printers. So I had to remap them with the new name.
 
  


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
Network boot and hostname mesh2005 Linux - Networking 2 05-07-2006 12:52 AM
Hostname/Routing problems with home network robintw SUSE / openSUSE 15 01-08-2005 07:55 AM
hostname on wireless network CoonerTheRed Linux - Wireless Networking 2 10-25-2004 12:40 PM
Network Hostname setting jianandyli2 Linux - Networking 1 09-22-2003 09:33 PM
Get IP by Hostname in Linux Network codecruncher Linux - Networking 7 09-07-2003 11:48 PM

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

All times are GMT -5. The time now is 12:43 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