LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Hostname updating... (https://www.linuxquestions.org/questions/mandriva-30/hostname-updating-257108/)

TheUnknown 11-20-2004 12:05 AM

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? :study:

opjose 11-20-2004 12:10 AM

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.

TheUnknown 11-20-2004 12:23 AM

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

opjose 11-20-2004 12:31 AM

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.

TheUnknown 11-20-2004 12:33 AM

I also see in "Network & Internet Configuration" for eth0
at the bottom after clicking "Advanced"
"DHCP-client"
It's set "dhcp-client"

TheUnknown 11-20-2004 12:36 AM

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

opjose 11-20-2004 12:43 AM

Just override it as indicated.

TheUnknown 11-20-2004 12:46 AM

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.

opjose 11-20-2004 12:48 AM

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.

TheUnknown 11-20-2004 01:02 AM

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).

TheUnknown 11-20-2004 01:50 AM

I could create a small script that pulls the hostname and assigns it and add it to cron.....

opjose 11-20-2004 02:52 AM

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

TheUnknown 11-27-2004 11:28 PM

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.


All times are GMT -5. The time now is 02:52 PM.