Hostname changes when eth0 dhcp goes ifup

Hostname changes when eth0 dhcp goes ifup

Post by Alan Watso » Tue, 11 Mar 2003 18:31:33



Hello,

I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp and polls
my broadband provider and eth1 runs my network on 192,168.2.xx. I masquerade
using ipchains. Up until now everything has been running fine, but now ...

When eth0 comes up something is changing the hostname of my computer from
say argus.arguscom.com to something like dhcp-24-9. This is causing big
problems with x server and I can only retain the orginal hostname if I leave
eth0 ifdown and reboot. As soon as I bring eth0 up again the problem occurrs
again.

I would be really grateful for any help on how to sort this out.

Thanks,

Alan

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by JP » Tue, 11 Mar 2003 18:34:17



Quote:> Hello,

> I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp and polls
> my broadband provider and eth1 runs my network on 192,168.2.xx. I
masquerade
> using ipchains. Up until now everything has been running fine, but now ...

> When eth0 comes up something is changing the hostname of my computer from
> say argus.arguscom.com to something like dhcp-24-9. This is causing big
> problems with x server and I can only retain the orginal hostname if I
leave
> eth0 ifdown and reboot. As soon as I bring eth0 up again the problem
occurrs
> again.

> I would be really grateful for any help on how to sort this out.

dhcpc -R....something (??)

Check out the man page for your distro on dhcpc. Add the relevant option to
your startup script.

JP

--
There are 10 types of people in this world
Those that understand binary and those that don't

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by Alan Watso » Tue, 11 Mar 2003 19:32:58


Hi JP,

I'm a bit new to this issue. Would you have any idea why it might have
changed? It has worked for over a year without any problem.

Thanks,

Alan




> > Hello,

> > I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp and
polls
> > my broadband provider and eth1 runs my network on 192,168.2.xx. I
> masquerade
> > using ipchains. Up until now everything has been running fine, but now
...

> > When eth0 comes up something is changing the hostname of my computer
from
> > say argus.arguscom.com to something like dhcp-24-9. This is causing big
> > problems with x server and I can only retain the orginal hostname if I
> leave
> > eth0 ifdown and reboot. As soon as I bring eth0 up again the problem
> occurrs
> > again.

> > I would be really grateful for any help on how to sort this out.

> dhcpc -R....something (??)

> Check out the man page for your distro on dhcpc. Add the relevant option
to
> your startup script.

> JP

> --
> There are 10 types of people in this world
> Those that understand binary and those that don't

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by James Knot » Tue, 11 Mar 2003 20:53:53



> Hello,

> I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp and polls
> my broadband provider and eth1 runs my network on 192,168.2.xx. I
> masquerade using ipchains. Up until now everything has been running fine,
> but now ...

> When eth0 comes up something is changing the hostname of my computer from
> say argus.arguscom.com to something like dhcp-24-9. This is causing big
> problems with x server and I can only retain the orginal hostname if I
> leave eth0 ifdown and reboot. As soon as I bring eth0 up again the problem
> occurrs again.

> I would be really grateful for any help on how to sort this out.

That's caused by running dhcp and the ISP providing the host name.
--

Fundamentalism is fundamentally wrong.


james.knott.

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by JP » Tue, 11 Mar 2003 21:09:45







> > > Hello,

> > > I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp and
> polls
> > > my broadband provider and eth1 runs my network on 192,168.2.xx. I
> > masquerade
> > > using ipchains. Up until now everything has been running fine, but now
> ...

> > > When eth0 comes up something is changing the hostname of my computer
> from
> > > say argus.arguscom.com to something like dhcp-24-9. This is causing
big
> > > problems with x server and I can only retain the orginal hostname if I
> > leave
> > > eth0 ifdown and reboot. As soon as I bring eth0 up again the problem
> > occurrs
> > > again.

> > > I would be really grateful for any help on how to sort this out.

> > dhcpc -R....something (??)

> > Check out the man page for your distro on dhcpc. Add the relevant option
> to
> > your startup script.

> Hi JP,

> I'm a bit new to this issue. Would you have any idea why it might have
> changed? It has worked for over a year without any problem.

Perhaps you've upgraded a few packages that reset the config to some default
values or something else changed (likely) or your ISP changed what
information it sent to it's DHCP clients (unlikely).

Just guessing.

JP

--
There are 10 types of people in this world
Those that understand binary and those that don't

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by Alan Watso » Tue, 11 Mar 2003 22:38:02


Hi JP,

I reinstalled, and reformatted my partition, from my distribution disk and
have the same problem so I don't think it is a package issue. How could
information sent from the Broadband ISP change DHCP client settings (in this
case Telstra Australia)?

Regards,

Alan








> > > > Hello,

> > > > I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp and
> > polls
> > > > my broadband provider and eth1 runs my network on 192,168.2.xx. I
> > > masquerade
> > > > using ipchains. Up until now everything has been running fine, but
now
> > ...

> > > > When eth0 comes up something is changing the hostname of my computer
> > from
> > > > say argus.arguscom.com to something like dhcp-24-9. This is causing
> big
> > > > problems with x server and I can only retain the orginal hostname if
I
> > > leave
> > > > eth0 ifdown and reboot. As soon as I bring eth0 up again the problem
> > > occurrs
> > > > again.

> > > > I would be really grateful for any help on how to sort this out.

> > > dhcpc -R....something (??)

> > > Check out the man page for your distro on dhcpc. Add the relevant
option
> > to
> > > your startup script.

> > Hi JP,

> > I'm a bit new to this issue. Would you have any idea why it might have
> > changed? It has worked for over a year without any problem.

> Perhaps you've upgraded a few packages that reset the config to some
default
> values or something else changed (likely) or your ISP changed what
> information it sent to it's DHCP clients (unlikely).

> Just guessing.

> JP

> --
> There are 10 types of people in this world
> Those that understand binary and those that don't

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by JP » Tue, 11 Mar 2003 22:51:07











> > > > > Hello,

> > > > > I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp
and
> > > polls
> > > > > my broadband provider and eth1 runs my network on 192,168.2.xx. I
> > > > masquerade
> > > > > using ipchains. Up until now everything has been running fine, but
> now
> > > ...

> > > > > When eth0 comes up something is changing the hostname of my
computer
> > > from
> > > > > say argus.arguscom.com to something like dhcp-24-9. This is
causing
> > big
> > > > > problems with x server and I can only retain the orginal hostname
if
> I
> > > > leave
> > > > > eth0 ifdown and reboot. As soon as I bring eth0 up again the
problem
> > > > occurrs
> > > > > again.

> > > > > I would be really grateful for any help on how to sort this out.

> > > > dhcpc -R....something (??)

> > > > Check out the man page for your distro on dhcpc. Add the relevant
> option
> > > to
> > > > your startup script.

> > > Hi JP,

> > > I'm a bit new to this issue. Would you have any idea why it might have
> > > changed? It has worked for over a year without any problem.

> > Perhaps you've upgraded a few packages that reset the config to some
> default
> > values or something else changed (likely) or your ISP changed what
> > information it sent to it's DHCP clients (unlikely).

> > Just guessing.

> Hi JP,

> I reinstalled, and reformatted my partition, from my distribution disk and
> have the same problem so I don't think it is a package issue. How could
> information sent from the Broadband ISP change DHCP client settings (in
this
> case Telstra Australia)?

> Regards,

> Alan

Well, if you're saying you did *NOTHING* then a very wild stab in the dark
was that the ISP changed their configs to send hostname/DNS information as
well as IP (this was a total guess and prolly not accurate your your setup).

You mentioned that you reinstalled/refformatted your partition which would
use the package defaults. The defaults doe the DHCP client are to obtain all
IP/Hostname and DNS information from the DHCP server hence your hostname is
being overwritten when it connects to the ISP DHCP server.

You will need to check out your dhcp client startup scripts and the man page
for dhcpc to use the correct startup option.
I use RedHat myself and have amended a DHCPARGS option to include a "-R". On
older versions of redhat I had to modify
/etc/sysconfig.d/network-scripts/ifup and add the -R to the relevant line
which started the DHCP client.

You need to make sure that these are still in place and if not create them.

HTH

JP

--
There are 10 types of people in this world
Those that understand binary and those that don't

 
 
 

Hostname changes when eth0 dhcp goes ifup

Post by Alan Watso » Wed, 12 Mar 2003 08:15:09


Hi JP,

Fixed it thank ... Just to close the thread properly the issue was the file
/etc/sysconfig/network-scripts/ifup-dhcp was using  /sbin/dhcpcp -HD in the
ipup section. I removed the -H (which stops it overwriting the Hostname and
everything now seems fine.

My Kernel version is Caldera 2.2.14-5.0. I have no idea why it worked
previously as the file is the standard install from the Distribution disk.
Maybe the ISP used to not send hostname (is this possible?).

Regards,

Alan












> > > > > > Hello,

> > > > > > I am running Caldera Linux with 2 NIC cards. eth0 is set to dhcp
> and
> > > > polls
> > > > > > my broadband provider and eth1 runs my network on 192,168.2.xx.
I
> > > > > masquerade
> > > > > > using ipchains. Up until now everything has been running fine,
but
> > now
> > > > ...

> > > > > > When eth0 comes up something is changing the hostname of my
> computer
> > > > from
> > > > > > say argus.arguscom.com to something like dhcp-24-9. This is
> causing
> > > big
> > > > > > problems with x server and I can only retain the orginal
hostname
> if
> > I
> > > > > leave
> > > > > > eth0 ifdown and reboot. As soon as I bring eth0 up again the
> problem
> > > > > occurrs
> > > > > > again.

> > > > > > I would be really grateful for any help on how to sort this out.

> > > > > dhcpc -R....something (??)

> > > > > Check out the man page for your distro on dhcpc. Add the relevant
> > option
> > > > to
> > > > > your startup script.

> > > > Hi JP,

> > > > I'm a bit new to this issue. Would you have any idea why it might
have
> > > > changed? It has worked for over a year without any problem.

> > > Perhaps you've upgraded a few packages that reset the config to some
> > default
> > > values or something else changed (likely) or your ISP changed what
> > > information it sent to it's DHCP clients (unlikely).

> > > Just guessing.

> > Hi JP,

> > I reinstalled, and reformatted my partition, from my distribution disk
and
> > have the same problem so I don't think it is a package issue. How could
> > information sent from the Broadband ISP change DHCP client settings (in
> this
> > case Telstra Australia)?

> > Regards,

> > Alan

> Well, if you're saying you did *NOTHING* then a very wild stab in the dark
> was that the ISP changed their configs to send hostname/DNS information as
> well as IP (this was a total guess and prolly not accurate your your
setup).

> You mentioned that you reinstalled/refformatted your partition which would
> use the package defaults. The defaults doe the DHCP client are to obtain
all
> IP/Hostname and DNS information from the DHCP server hence your hostname
is
> being overwritten when it connects to the ISP DHCP server.

> You will need to check out your dhcp client startup scripts and the man
page
> for dhcpc to use the correct startup option.
> I use RedHat myself and have amended a DHCPARGS option to include a "-R".
On
> older versions of redhat I had to modify
> /etc/sysconfig.d/network-scripts/ifup and add the -R to the relevant line
> which started the DHCP client.

> You need to make sure that these are still in place and if not create
them.

> HTH

> JP

> --
> There are 10 types of people in this world
> Those that understand binary and those that don't

 
 
 

1. hostname gets reset wrong by activating eth0 with DHCP

I'm running a new Fedora fc4 (2.6.14-1.1656_FC4) on a laptop and have a
cable modem.

The problem: whenever I enable eth0, either from the Newtork
Configuration gui or automatically at bootup, the hostname gets reset
from localhost.localdomain (two words, with dot in the middle) to
localhostlocaldomain (one word, no dot).  This causes all sorts of
problems in communication with the outside world and within gnome.  I
can easily fix it temporarily by typing the command as root

# hostname localhost.localdomain

...but this is cumbersome, and I'd prefer a longterm fix.

More info:

1) In the Newtork Configuration gui, I have the following setting:
  *  Automatically obtain IP Address settings with DHCP
  *  Hostname=localhost.localdomain
2) Every file I've checked shows the proper
hostname=localhost.localdomain, including:

* /etc/hosts:
127.0.0.1       localhost.localdomain   localhost

* /etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=...
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=localhost.localdomain
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
NEEDHOSTNAME=no

(last line added by me in futile attempt following suggestion
elsewhere)

* /etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=localhost.localdomain

...and yet, as soon as I activate eth0, I get:

localhostlocaldomain


Thanks in advance for the magic incantation!

James

2. tty snoop for SunOs...

3. Wrong posting: Changing Hostname made my Linux Box go crazy, Correction here

4. HP JetAdmin utility on SS20/Solaris 2.3 (didn't work) ((now it does))

5. Changing hostname and DHCP

6. How do I setup a portable Fileserver that hooks up to Macs and WinPCs via ethernet ?

7. Stop DHCP from changing hostname?

8. MCA, SXnow, Cache-enabling

9. dhcp changes hostname

10. Change DHCP hostname

11. Change DHCP assigned hostname

12. '~$ sudo ifup eth0' does not provide Internet access.

13. system hangs on 'ifup eth0'