Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
RH7 recognizes my network card (3com etherlink 10/100 PCI) but...
My setup is that I use a Linksys 4 port router, which has been assigned a static IP - which in turn automatically assigns IP addresses to the 2 Windoze and 1 Mac on my network. How do I get RH7 to receive IP addresses from router? Messed around in netcfg and couldn't find. My IDG book is sucking at this point....
You need DHCP. See if 'pump' or 'dhcpcd' is installed and then check the man pages ('man pump' or 'man dhcpcd'). There's also a RedHat util for setting up your network but the name escapes me.
For your Linksys router you probably don't need any options and if you have only one network card it should be a piece of cake.
Nope. The router uses DHCP and setting RH7 as DHCP conflicts. I gotta figure out another way. Mostly, I just want internet connection up to update RH7 to 7.2....
THe router should be a DHCP _server_ for your internal network (gives out private IP addresses internally) and a DHCP _client_ (gets an Internet IP address) for adresses given to you from your ISP. You do not need to get a DHCP server set up on your computer - you simply need a client to get an address offered to the private network by your router/forwarder.
so what you're saying is disable DHCP in Linux and then... ?
My Windoze works fine from the 'Automatically obtain IP address' from my router... What I'm trying to figure out is a similar command in Linux.
Easiest thing to do is open a terminal window, 'su' to root and run 'netconfig' (or is it 'netcfg', I can't remember)... on 7.2 run netconfig. It'll run a quick program that will allow you to tell the system to run as a dhcp client.
Thanks gang! It worked. I now have a better understanding. I am starting the glorious tweaking phase now. (so far so good) The GUI's are cool with this thing... I can't wait to start figuring this stuff out! Once I enabled DHCP client, I RPM-updated for about 4 hrs, kernel and all. Sweet. Today I start figuring out the file system. My book was useless, for the most part, I learn this stuff better thru screwing around....
Ok, I am having a similar problem. I am using Redhat 7.1 with a linksys router. I have DHCP set up correctly/my internet is working, but my hostname does not resolve into my ip. If i cange the hostname from localhost.localdomain which is in the host file as 127.0.0.1 I get an error message everytime I log in saying that my hostname doesn't have an IP. In netcfg I have my ethernet card enabled with dhcp but it doesn't set/show the ip address. I don't want to force the router to give me a static ip but I don't know how else to fix this. And somehow my internet is working.
You shouldn't change the localhost setting, that's something that's just used for internal networking (and some other stuff) that's cool as is. As root, you'll need to vi (or your favorite editor) the /etc/hosts file and add in your hostname and IP address for your machine if it's not already there. Setting the hostname is also important and, if I recall, can be done easiest through the "hostname" command.
Your /etc/hosts file should look something like this:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain
192.168.1.100 your.machine.name alias alias
Your IP address will be different (possibly), as I am running a private network which gets translated through the Linksys router to the outside world -- you probably should have something similar. Of course, "your.machine.name" would be the FQDN for your machine, then any aliases you want to know it by. So, if you call your machine "kermit.muppets.com" your alias might be "kermit".
Anyhow, hope this helps.
P.S. Screwing around with this stuff is how I learned everything, too. I may not know everything, but I can usually manage to screw it up enough that I have to learn to fix it.
Thank you for your reply, I guess maybe I wasn't clear enough, I would add my hostname to the /etc/hosts file but my ip is dynamically assigned by a dhcp server on my lan (shared with 2 windows machines) therefore it wouldn't do me any good because I would need to update the file everytime I get a new ip.
I can see your dilemma and went through this myself; however, there's a way to get around that, I'm assuming you have a small network, so that this is easy and not unmaintainable -- you can add the IP address assigned to you by your DHCP server to the /etc/hosts file. This usually works well (this is what I have been running with for over 2 years now without problem).
The reason it works is because the IP assigned your machine is based off the MAC address of the interface, which is unique to the NIC installed on your machine. Normally the IP address won't change when it's time to renew. Reason being, the DHCP server sees the same MAC from before and assigns the same IP address.
Otherwise, you could use another DHCP server (like your RH system ) to generate names for you and install those names in the /etc/hosts list, adding the use of aliases to make things easier when referring to hosts by name. But, that's too complicated, really, and the initial suggestion should work just fine.
Also, as long as your DHCP server (specifically, your Linksys router) is assigning IP addresses, your Internet will work just fine with or without recognized hostnames.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 Alpha localhost.localdomain localhost
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.