LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 11-20-2004, 12:05 AM   #1
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Rep: Reputation: 15
Hostname updating...


Ok, when I had Roadrunner I had NO problems with hostname updating.

Now we have RCN and I think either RCN or MDK 10.1-OE is not updating the hostname or it's loosing it.

I tried looking thru the system files which don't seem to follow other distros layout.

I know it's something simple here. I'm getting tired of opening a terminal su'ing and typing in hostname blah-blah-blah.blah.blah

Any suppestions gang?
 
Old 11-20-2004, 12:10 AM   #2
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Just set the hostname for the eth0 device in the MCC.

This will "stick" through a reboot.

Worst case set the zeroconf hostname as well.
 
Old 11-20-2004, 12:23 AM   #3
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
What is happening is that from RCN's DHCP server they seem to be setting my hostname to "dhcp1575-15" at this moment. Not sure exactly why they are.

I'm on cable and dynamic IP.

After I type in the REAL hostname it lasts about 10-15 mins. Then resorts to dhcpblah-blah
 
Old 11-20-2004, 12:31 AM   #4
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Yes, that is correct behaviour.

Mandrake is obtaining it's ASSIGNED hostname via DHCP as it should.

You want to override this, which is ok if you wish.

You need to set the hostname manually for the connected eth0 interface.

This sets the machinename at the same time.
 
Old 11-20-2004, 12:33 AM   #5
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
I also see in "Network & Internet Configuration" for eth0
at the bottom after clicking "Advanced"
"DHCP-client"
It's set "dhcp-client"
 
Old 11-20-2004, 12:36 AM   #6
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
The problem is that if someone want to connect to http or ftp they cant since the hostname is set to dhcp.....

What its not doing is setting the hostname like other distros do to what the DHCP server assign.

IE: 207-212-36-12.fd.rcn.cable.com

Instead it assigns "dhcp1575-15"

dhcp1575-15 is NOT the REAL hostname

Last edited by TheUnknown; 11-20-2004 at 12:37 AM.
 
Old 11-20-2004, 12:43 AM   #7
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Just override it as indicated.
 
Old 11-20-2004, 12:46 AM   #8
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
I do that time and time again. I've reset the hostname in MSS but it's NOT keeping the true hostname. I wonder if it's due to them not wanting people to run services off this type of account? Having the dhcp assign a bogus hostname instead?

I think I may not have explain myself right... I don't have a Permanent IP, DHCP assigns me one.

Last edited by TheUnknown; 11-20-2004 at 12:48 AM.
 
Old 11-20-2004, 12:48 AM   #9
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Hmmm...

The ifup script for the interface sets the hostname.

If it's not sticking, at worst case, you could modify it so as NOT to pull a bogus dhcp hostname.

This would affect all interfaces though.
 
Old 11-20-2004, 01:02 AM   #10
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
I see that dhcpd is running on the machine so it should get a correct hostname.

I see that "DHCP-client" is installed, maybe thats where the prob is? DHCPCD isn't installed and thats an alternative(which I have used in Gentoo).
 
Old 11-20-2004, 01:50 AM   #11
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
I could create a small script that pulls the hostname and assigns it and add it to cron.....
 
Old 11-20-2004, 02:52 AM   #12
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Quote:
Originally posted by TheUnknown
I see that dhcpd is running on the machine so it should get a correct hostname.

I see that "DHCP-client" is installed, maybe thats where the prob is? DHCPCD isn't installed and thats an alternative(which I have used in Gentoo).
Eh, I don't understand.

If the server (dhcpd) is running, then your machine will be doling OUT IP addresses on your network.

Since your machine should be GETTING an IP address not serving them up, this is a misconfiguration.

dhcpd = the DHCP Daemon process server found in /usr/sbin or /sbin
 
Old 11-27-2004, 11:28 PM   #13
TheUnknown
LQ Newbie
 
Registered: Aug 2003
Location: N.Y.
Posts: 23

Original Poster
Rep: Reputation: 15
Ok, back from California...

Let's restart this...

1) I have Cable Internet Service
2) It's serves me a Dynamic IP and Hostname
3) When I was using Roadrunner and Adelphia they both ran fine on our server adn we had NO hostname issues
4) We now have RCN and it sets the hostname on the server as dhcp##-##
5) I can type in a su'd terminal "hostname blah-blah-blah.blah.blah.blah" and that resets the hostname
6) After @ 10-15mins the hostname resets back to dhcp##-##

Now this is a problem when trying to use FTP or HTTP since it says that "dhcp##-##" is NOT my REAL hostname.
 
  


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
Hostname gdeswardt Linux - Networking 2 01-15-2005 02:23 AM
hostname mikpos Linux - Newbie 9 08-27-2004 02:38 PM
Hostname spotslayer Linux - Software 1 07-26-2004 08:56 PM
hostname guyd Linux - Newbie 5 08-18-2003 09:07 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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