LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2003, 06:29 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Big, Old Problem of Mine


I'm resuming the fight to tackle this one problem I'm having with my RH9.0 linux machine. I've spent days on this and haven't found the solution. I've had this same problem on RH8.0 as well.

I have two NICs in my linux machine. One takes a dynamic IP from the cable modem and the other has a statc IP on my local network. If I try to boot there are two things that you notice right away...

1) The hostname has changed from localhost.localdomain to something that kinda looks like a MAC address. It's something like x1-14-a3-yadda yadda.

2) It runs incredibly slow. I'm pretty much a newbie, but it seems that anything that has to open a new shell takes about 60 seconds to actually load. Opening a terminal in KDE, for example.

There are some other things that happen that tell me that perhaps the problem is that the hostname is different. When I shut down in this scenario, one of the processes can't be killed because the computer says the process is running on another host (localhost.localdomain, I'm guessing).

Does anyone have any suggestions or need more info to help?
 
Old 11-30-2003, 06:37 PM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
you seem to have configured your DHCP client to change your hostname/domain
when accepting a new address.
check your dhcp client software configuration and turn off that option
 
Old 11-30-2003, 06:39 PM   #3
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Yes....this is hostname resolution problem. Seems your ISP may not have an optimum setup or your install may be misconfigured. Do not allow the hostname to be changed via DHCP.

Make sure you set your hostname manually. Make sure the loopback is listed in /etc/hosts.

********************
EDIT
********************

You may have to edit the dhclient-script file in /sbin


Last edited by jcookeman; 11-30-2003 at 06:41 PM.
 
Old 11-30-2003, 06:46 PM   #4
dubman
Member
 
Registered: Jan 2003
Distribution: Redhat 9, Fedora Core 1, Suse 8
Posts: 188

Rep: Reputation: 30
you can change you host name in /etc/sysconfig/network, and set HOSTNAME="whatever_you_want". jcookeman is right about the host file. Other than that make sure your ifcfg-ethx profiles are correct. these are located at /etc/sysconfig/network-scripts/. You can configure you interfaces to come up however you want (onboot, DHCP, static, etc.) with these profile configurations.

hope this helps

--dubman
 
Old 12-01-2003, 12:57 AM   #5
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Thanks a ton for the help, guys. It's finals week, so I can't really put much effort into this until Thursday. I'll be reviving this thread around then with results.

In the meantime, is there any place I can find information on how to control my network devices without using KDE's GUI tool?
 
Old 12-10-2003, 12:00 AM   #6
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Okay, finals are over and it's time to tackle this problem. I looked at the /sbin/dhclient-script file and found one line that assigns a host name via the hostname command. Because of some processes running on the linux box right now, I can't comment this out and see if that fixes it until tomorrow.

I have a question in the meantime, though... how should I have known to look at that script? I'm a linux newbie, and I don't know where to look when it comes to hardware stuff. I don't know what scripts are relevant in these situations, and more importantly, I don't know how to manipulate the hardware setup without the GUI tools that are in KDE. Where can I find information on this?
 
Old 12-10-2003, 12:26 AM   #7
ezra143
Member
 
Registered: Aug 2003
Location: NY
Distribution: RH9, RH8, Slack, Vector
Posts: 497

Rep: Reputation: 32
the MAN pages are a good place to start, from a terminal type
# man hostname
and that shold point you in the right direction. To edit a script via terminal, well take network for example, you'd
# cd /etc/sysconfig/ to change to that directory
# vi network to bring up the VI editor
then change your hostname. you'll need to hit 'i' to insert and escape when your done. shift-semicolon will give you a prompt and wq will commit your changes whereas q! will exit without saving your changes.
# man vi will give you some more commands for VI
then you would restart your network
 
Old 12-10-2003, 10:48 AM   #8
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Oh, I know how to do all that stuff. I think you misunderstand my question. I'm able and willing to go through scripts and to change my hardware settings without the use of the KDE tools. I just don't know WHICH files to look at. I don't know where to find such information. I didn't know the dhclient-script file existed, let alone did I know it was relevant to my problem.
 
Old 12-10-2003, 11:07 AM   #9
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I changed the one line in the dhclient-script file that used the hostname command to simply output the variable it was using to a file so I could be sure that it was the culprit. Indeed it was. The name it was giving my computer (which I already knew) was x1-6-00-04-5a-68-f2-6b.

Now, however, I'm getting another name, and this one is clearly from the ISP... c-24-1-177-143.client.comcast.net.

Since the dhclient-script file is not the issue anymore, what should I look at next?
 
Old 12-11-2003, 11:25 AM   #10
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I found a solution. I found in my network-functions file a function that was called need_hostname() or something like that. It was small and performed an obvious task, given its name. I noticed that it returned true if the hostname was "(none)" or if it was localhost. I simply changed it to return true only if the hostname was "(none)". This seems to have worked. I have both my NICs online and everything seems to be in order. The hostname is also correct.
 
  


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
Big O, Big Omega, and Big Theta oulevon Programming 7 05-26-2010 07:18 AM
Looks like crap on mine also wonderboy1999 DamnSmallLinux 5 01-06-2005 05:59 AM
Big, big Problem on vsftpd rhonneil Linux - Newbie 1 10-01-2003 02:18 PM
Installing RH 9 with RAID 5 --Big, big Problem!!! rhonneil Linux - Software 2 09-25-2003 08:13 PM
Mine is BIGGER than yours kabong Linux - General 7 10-19-2002 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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