LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-14-2004, 01:39 AM   #1
josh18
LQ Newbie
 
Registered: Apr 2004
Distribution: fedora
Posts: 2

Rep: Reputation: 0
hostname broke eth0 & dhcp


I installed Fedora for the first time today, at work on
a mostly windows LAN - (aside from one BSD server). everything
was working fine using dhcp. (browsing, download all ok :-)

As the installation didn't ask for a host name, I tried to set it
myself. Not knowing about the GUIs then, I simply ran
hostname tiger
at the command line. Following this, I rebooted the machine and
now eth0 fails (hangs til it times out), and I suspect this
is due to dhclient also failing...
mysteriously, I do not see the hostname "tiger" anywhere.

I then found the gnome network config GUI and under the "DNS" tab
I have set the Hostname to tiger.company.domain.name
(is that the right format?)
but alas the damage appears to have been done somewhere and
eth0 still will not start (neither "ifup eth0" nor GUI activation nor reboot)
now that a hostname is present in /etc/sysconfig/network it complains
that the hostname is not in /etc/hosts too. but earlier today when it
worked fine, only the loopback line appeared in the hosts file..

help? can someone please tell me how to re-set it so eth0 and dhcp will work again?

thanks v.much, newbie.
 
Old 04-15-2004, 01:30 PM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
The command hostname only sets the hostname temporary for the duration of the session. Next reboot it will be reset to what is written in the configuration files.

To set the hostname on a Red Hat edit /etc/sysconfig/network:
HOSTNAME=<hostname>

and
/etc/hosts:
<IP> <hostname>
 
Old 04-16-2004, 12:10 AM   #3
josh18
LQ Newbie
 
Registered: Apr 2004
Distribution: fedora
Posts: 2

Original Poster
Rep: Reputation: 0
ah thanks. should the host name within /etc/sysconfig/network include domain name ?
thanks again.
 
Old 04-16-2004, 02:47 AM   #4
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
No it should be the same as you see on the console prompt.
 
  


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
dhcp broke, pump fails? ulaoulao Linux - Networking 1 12-03-2004 08:33 PM
dhcp hostname .... phoeniXflame Linux - Networking 6 12-07-2003 11:12 AM
broke /bin/hostname nitsky416 Linux - Networking 2 11-30-2003 04:45 AM
PB with DHCP and HostName jp515 *BSD 1 11-21-2003 04:57 AM
Changed my hostname and broke sshd Itzac Linux - Networking 7 03-23-2003 06:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:43 PM.

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