LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Localhost Localdomain Question (https://www.linuxquestions.org/questions/linux-newbie-8/localhost-localdomain-question-331380/)

threegig 06-07-2005 08:47 PM

Localhost Localdomain Question
 
Hey everyone this must sound like a really stupid question but I was wondering in RedHat when you see localhost.localdomain what does this mean?

Is is the machine localhost on the domain called local host?

Can someone please explain this to me and if I dont have a domain name like whatever.com how is this of use to me? Or is it a internal intranet style naming scheme?

Thanks Guys

rose_bud4201 06-07-2005 09:10 PM

They are just the default values given to your machine. Since you aren't on a domain, the system doesn't care what the values actually are (since they essentially have no meaning in a single-computer environment - no need for a unique identifier) and the network config defaults to using "localhost" and "localdomain".

Domain names don't just apply to the internet; they apply to an intranet as well. The difference is that internet domain names and the IP address they correspond to are registered on publicly accessible DNS servers (domain name server ;) ) which can resolve said domain name to the actual machine's IP address whenever someone's browser requests it. Domains which are local to your network aren't registered publicly, and therefore are only accessible to your local network (your router typically acts as the dns server in this case).

However...even on your local network, the network still needs to be able to uniquely identify each computer. Think of it this way - you have two computers, both named "localhost@localdomain", and you want to ssh into one of them...what's a poor router to do? Hence, the need for unique hostnames.

You can change both values if you like. I believe that RedHat has the netconfig command... If not, it will have some GUI network config utility. I usually change my hostname to something more descriptive (if nothing else, so that I can tell my PuTTY sessions apart ;) ) using the command 'hostname' (as root).

[Sorry if this is rambling/slightly inaccurate. I didn't actually consult wikipedia or google while writing this.]

threegig 06-11-2005 01:42 PM

Thankyou so much I really understand that now.. so if I had 3 machines and I wanted them to be able to share the net share files I would name my pc as -

pc1.homeserver.com
pc2.homeserver.com
pc3.homeserver.com

The first name can be anything unique to the others.
The second Hostname must be the same across the network.
And the .com could be .org , .com.au , or whatever.

What if I had those 3 machines and I wanted to HOST a webpage from one of the PC's say pc1, what if someone visits homeserver.com but some other comapny has registered homeserver.com? How does this work?

p.s - sorry for the late reply I have been flat out :)

rose_bud4201 06-11-2005 06:02 PM

You're pretty close, yup. Firstly, the "." is a sort of hierarchy-delimiter; it separates individual pc names from the domain name from the upper-level domain. Because your personal network is likely to be small enough that you can keep a handle on it without the upper-level grouping, you don't really need the ".com, .org, .au" part. You can certainly have it, but it won't have any special meaning (and in fact, it doesn't. Unlike public URL's, anything after the PC name gets lumped into the domain name. So whereas yahoo's domain name is "yahoo", yours would be "hostname.com").

Now - you certainly can make your domain "hostname.com", but that does _not_ constitute a DNS entry and that will not make your network publicly accessible. I could call my home network yahoo.com all I wanted, it won't ever matter. That network is only visible to your router/switch/hub whatever and the computers it controls.

Publicly-accessible DNS entries are gained by you paying someone for a domain name, and they go and register that domain name and the IP address of the computer hosting the website (or whatever it is). If I tried to register yahoo.com, someone would most certainly complain :)

So, if you wanted to host a website on your own server, you could either a) use your modem's IP address and tell your router to forwads requests coming in on port 80 to your particular pc, b) pay your ISP for a static IP address, set up apache and then register a hostname and your IP address, or c) use a service such as dyndns which will give you a publicly accessible URL while you still have a dynamic IP (it'll update its own DNS entries whenever your IP changes. And while the IPs given to cable modems rarely change, they definitely do).

Hopefully this isn't too rambling...

threegig 06-12-2005 04:36 AM

Rose-Bud no shit you are a master, do you know how much crap I have read looking for the answers you have given me so clearly.

Have you ever written any tuts or papers on any aspect of computing? if not you should.
Have you a website? I would love to check it out.

That makes sense to me apart from one thing - If I was running BIND what would happen if I configured it with yahoo.com pointing to my static IP? Can that be done? I have heard of running your own DNS server so doesnt that bypass the registering process? Say I registerd rosebud.com and I own it I could use BIND to tell the big name servers where I am on the net correct?


Thanks Again

threegig 06-13-2005 06:21 AM

**BUMP** Rose-Bud ;)

rose_bud4201 06-13-2005 08:59 AM

sorry :P You threw me one that I had to look up.

Basically, you can't do that :-)

Well....you *can*, but even though you're running your own DNS server you still have to ask your ISP to enter whatever external names you want (and the name of the box you're using as your DNS box) into their name server. No matter what, you're not a publicly available network on your own..you still go through your ISP. And if they're silly enough to try to give you yahoo.com, they're going to be in a hell of a lot of trouble when the big public DNS servers start trying to resolve that one...

What would happen is this - it would sort of work, for a little while. You would probably be getting packets going to both the real Yahoo and your box, because the new domain would be overwritten to point to you in some of the public dns servers, and would still point to 68.142.226.49 (Yahoo) on others. So depending on where the packets originated and which address the routers in between saw as pointing to "yahoo", the packets would go to one server or the other. These things take time to propegate through all of the DNS servers (which is why when you register a domain name with a provider, they usually tell you to wait 24 hours before expecting things to be perfect), but you could still fudge things up pretty quickly.

In any case, your ISP would probably tell you something rude if you asked them to use a domain name that was already taken. And if they didn't catch it first, the federal agencies that control the registering of domain names (there's 1 in every country) would find you pretty quickly to err..."correct" things ;)

edit: and yes, but just a personal one - http://www.cybermenology.com. Stop on by :-)

threegig 06-15-2005 03:57 AM

Thanks Heaps Rose Bud :)

What does this mean in your tag line?

The best Windows accelerator is that which works at 9.81m/s^2

9.81 meters per second? I dont get it ?

win32sux 06-15-2005 04:21 AM

Quote:

Originally posted by threegig
The best Windows accelerator is that which works at 9.81m/s^2

9.81 meters per second? I dont get it ?

9.81 meters per second (squared)... that's about one g - the acceleration which is caused by earth's gravity at around 45 degrees latitude...

http://en.wikipedia.org/wiki/Gee

rose_bud4201 06-15-2005 07:29 AM

There used to be a decently big phenomenon of sites offering "Windows Accelerators"...sort of like download accelerators, I guess...Apps that were supposed to make your computer run faster. I don't know if they did anything but open all of your ports to pr0n email spammers, but that's a matter of debate.
However, I'm more in agreement that the best windows accelerator is gravity, or in other words Windows is at its best when it's just been thrown out of a 30-story building ;)


All times are GMT -5. The time now is 07:20 PM.