Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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
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.
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?
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?
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
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.