LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Naming My Computer and stuff (https://www.linuxquestions.org/questions/linux-newbie-8/naming-my-computer-and-stuff-205022/)

mst700 07-14-2004 02:56 PM

Naming My Computer and stuff
 
I need some assistance, what are the proceedures in naming my machine

I know this is a very basic question for some, I have not gotten it yet. I have the name localhost.localdomain as default for my machine. I would like to name it something else and be able to have my other computers see this.

I know that if I change my host name and things like that I lose INTERNET connectivity, so I want to understand what are the correct procedures.

If there is an article that explains it in "newbian talk" please direct me, or explain it so I can go to the correct files.




:study: mst700:study:

Newbies will one day be the masters!

acid_kewpie 07-14-2004 02:59 PM

just use the hostname command as root. e.g. "hostname l33t_h4X0rz_boxen" or whatever takes your fancy.

scuzzman 07-14-2004 03:07 PM

will this be permanent, or just for that one session?

Electro 07-14-2004 03:50 PM

It will only use the domain name and hostname that you change to until you reboot. If you want to make it permanent, add the same commands that you entered at the console in rc.local. You have to be as root to edit rc.local. There are other ways too, like adding or editing a line or two in sysctl.conf. Below is the sysctl lines that you can add or edit in sysctl.conf.

kernel.domainname = localhost.localdomain
kernel.hostname = localhost.localdomain

You can type "service network restart" to reactivate your network connection.

mst700 07-14-2004 05:58 PM

Thanks acid_kewpie for the links
 
Quote:

the Rute users guide, all you need to know to get going
How to ask good questions - please read!
These are very helpful links thank you.


Thanks Electro for making it clear.

:study: mst700:study:

Newbies will one day be the masters!

javageek 07-14-2004 06:35 PM

setting your host name
 
depending on your distribution, there are several utilities that can help you configure it.
for example: Suse uses yast, redhat depending on version uses ntsysv or linuxconf,
Mandrake depending on version uses linuxconf - newest version uses their propriatory control center which is available in graphical and text mode (Configure my computer in graphical mode or mcc under text mode)

Alternatively you can install linuxconf on any distribution!

mst700 07-15-2004 07:46 PM

[B]Naming my computer kicks me off the internet.[/B]
 
Naming my computer kicks me off the internet.

Can anyone tell me what I am doing wrong? I have completed this step:

Quote:

It will only use the domain name and hostname that you change to until you reboot. If you want to make it permanent, add the same commands that you entered at the console in rc.local. You have to be as root to edit rc.local. There are other ways too, like adding or editing a line or two in sysctl.conf. Below is the sysctl lines that you can add or edit in sysctl.conf.

kernel.domainname = localhost.localdomain
kernel.hostname = localhost.localdomain

You can type "service network restart" to reactivate your network connection.
I can't connect to the internet after I make the change, so I return my files to orginal condition and I connect with np.


:confused: mst700:confused:


Newbies will one day be the masters!

Electro 07-16-2004 12:43 AM

How are you connected to the internet?

Are connected straight to the modem like cable or xDSL?

Are you connected to a dial-up service?

If you are connected straight to a cable or xDSL modem, I can see you are having problems. Some ISP uses either hostname and domainname to look up you on their server. Other ISP uses the MAC address of your computer instead of the MAC of the modem. Using the MAC address from the modem makes it easy for you to change the hostname or domainname of your computer. Using a router, you can change your IP address, your MAC address, domainname, and hostname on your computer.

You can also try "service internet restart".

mst700 07-16-2004 06:17 PM

My current configuration
 
I am currently configured like this:

Config #1

ISDN ext modem --> WINXP SP2 machine --> Linux box
--> WINXP SP2 second machine
--> Mac Laptop


I want to make the linux machine the DNS/HTTP/Gateway etc..... and have a router connected to the linux box so the other computers can connect. Like this:

Config #2

ISDN ext Modem ---> Linux Box ---> Router ---> WINXP SP2
---> WINXP SP2
---> Mac Laptop
---> WEBCAM #1
---> WEBCAM #2
---> WEBCAM #3


So, my biggest question is who do I get the Linux box named and work from there. My ISP doesn't have any problem with me naming my WIN machine, so I was confussed why the linux machine would? I really want to work with config #2 as my network because I have to reboot WIN machines every 3 days or so and didn't want to have to do it.


P.S> My ISDN ext modem needs a computer to work so that is why I have a machine on the out side of the router. I can make the ISDN machine connect to the internet with my settings hostname= localhost, domainname =localdomain. I want to make to name my linux box Penguingateway and my local area net as geek.net. so it would look like Penguingateway.geek.net

Any help is welcome.

:study: mst700:study:

Newbies will one day be the masters!

jamuz 07-16-2004 07:00 PM

Referring to your Config #2---

If you configure your linux box as a gateway you don't need a separate router. A hub (or better, a switch) is a simpler, less expensive and functionally adequate interface to all the other boxes. Just be sure to get a hub or switch with enough ports---eight minimum for your Config #2.

Best wishes.

mst700 07-16-2004 10:23 PM

Route or Switch
 
I that sound great except I have a i707 D-Link Route/Switch already, so I was going to go with the config #2. This still don't help/explain why I can't name my computer.


:study: mst700:study:

Newbies will one day be the masters!

mst700 07-17-2004 07:43 PM

WOOT
 
got the name changed

Only problem is I get a flag error saying can't find IP address for PeguinGateway.geek.net (my gateway linux machine)
So I assume I have defined something that makes the DNS/DHCPD want to go to the net and look for the IP address. I might be a little confused on procedure. Can anyone tell me what kind of network I should be running:

I have:

ISDN ext modem----> Linux box ----> D-Link i707p Router ---->

WINXPSP2
WINXPSP2
Mac Laptop
WEBCAM #1
WEBCAM #2

I want to be able to have all ip's connect to the INTERNET via ISDN modem/Linux box. Should I be setting up a different type of DNS/dhcpd? If you want I can make available my /etc/hosts, /etc/rc.local, /etc/syscfl.conf, /etc/dhcpd.conf files. If you think that will help?]

Please advise.


:scratch: mst700:scratch:

Newbies will one day be the masters!

frob23 07-17-2004 08:06 PM

/etc/hosts
/etc/dhcpd.conf

And /etc/resolv.conf

With these files we might be able to spot what is going on. There is one other file where the problem might be but I don't think so.

Also... do all the computers have a hosts file so they can find each other by name?

mst700 07-17-2004 08:14 PM

Quote:

With these files we might be able to spot what is going on. There is one other file where the problem might be but I don't think so.
My other machines are windows XP, and MAC. I don't know how they work as far as hosts files. I will post my files shortly. I am at work now until 0800Z. I will post then.

Electro 07-17-2004 11:42 PM

The hosts file in LINUX is the samething in Windows and MAC. In your hosts file in LINUX, do not remove the line that says localdomain. Just leave it and add your server name.

Did you disable dhcp in your router. Is WAN port not connected because if it is I can see you are having problems.

Use only the ports on the router that are a switch hub not WAN.

To make it easy, only setup DHCP server on the LINUX system. Then if you really need DNS, you can set it up. After you got your network working, you may want to setup squid or web cache service. Do not forget to setup firewall like iptables.

To make sure your setup works connect a crossover ethernet cable from any of your systems to the LINUX system. If it works then you can use the the switch hub.

I suggest getting either cable or xDSL because ISDN is much, much slower than cable and xDSL. The prices of cable and xDSL has changed a lot when ISDN was around. Both cable and xDSL is very easy to use. You just hook it up to the wan port of your router and all your systems can be connect to the internet.

I suggest looking at some documentation at tldp.org.


All times are GMT -5. The time now is 09:17 AM.