LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-24-2002, 09:58 AM   #1
feaz
LQ Newbie
 
Registered: Apr 2002
Location: Jacksonville, FL
Posts: 11

Rep: Reputation: 0
How do I get an IP address?


I am having problem after problem getting telnet services to work in Linux, whichis proving to be a real monster, because I am trying to teach students about UNIX, and am encountering nothing but problems along the way. On one PC, I have been having problems getting the telnet service to work. On this laptop, I tried to set up telnet services, but now I can't seem to get past the problem of pulling an IP address.

So much of this Linux stuff is either not in English, or the terms / names don't really any relavance to function, which makes it very hard to intuitively diagnose any of these probles, in spite of the fact that I am quite technically savvy. (How the Hell did they come up with "Gnome", anyway? What does KDE stand for, and who the heck is "Kudzo"?)

After installing RedHat 7.1, Kudzo came up and told me that one of my hardware configurations needed to be removed (the one for my PCMCIA NIC card), but didn't really say why. I assumed that it was going to detect my NIC again and everything would be fine.

Upon rebotting, I do not get an IP address from DHCP. Unlike Windows, it doesn't say WHY-- Was the server unreachable for some reason? Is it even TRYING to pull an IP address? I something missing from the configuration? All of the information returned by the IP command is so cryptic and non-intuitive!

After popping out the card and re-inserting it, it does seem that Linux is, perhaps after all, detecting it, and that perhaps my only problem is that I need to request an IP address from DHCP. My machine at home does this without a problem, although I don't know how to release or renew the address... The laptop apparently is not doing this automatically as it boots. I don't know how to set this option, nor do I know how to manually have it pull the address from DHCP, and the help isn't much... hellp... on this, as the information it gives seems to be completely irrelevant, although interesting.

I posted the contents of dmesg in another post, and I won't do that again here, but here is the output from "ip address show". If someone can please walk me through the process of setting up the IP address (I need to pull it from DHCP), I would be very appreciative. I teach programming at the college level, so I am not lacking in my technical savvy here, but for some reason, a logical pattern to learning my way through the ropes of Linux seems to really escape me. It would be nice to have a basic translation of a way to do common Microsoft system tasks in the Linux environment. I was very DOS savvy in my day (still am), so I'm not intimidated by the command prompt, but so much of it, again seems to be very non-intuitive, which was not the case at all with DOS.

Here is the IP command's output:

1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
link/ether 00:06:29:15:f6:ff brd ff:ff:ff:ff:ff:ff

I'm assuming that link/ether for item 3 is the MAC address for the card (why doens't it just say "MAC address" or "Hardware address", which is considerable more accurate in context.) Anyhow... Again, any help anyone can provide is GREALY appreciated, as I am really stuck out in left field on this stuff.

-- Jim
 
Old 04-24-2002, 10:19 AM   #2
akohlsmith
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 114

Rep: Reputation: 15
No problem!

(your first mistake is using RedHat -- it likes to hide things from you under a veil of MacOS "We'll look after you" but fails horribly)

Quick answer: "dhcpcd eth0" will solve your problem. dhcpcd is the DHCP Client Daemon, and you're telling it which interface you want it to run (eth0).

Windows doesn't tell you jack about DHCP failures -- how many times have you seen "unable to retrieve an address from DHCP - do you want to see further DHCP messages?" -- not really intuitave or detailled in my opinion.

I am guessing that your ethernet adaptor is not automatically grabbing an address from DHCP as the PCMCIA configuration for it has nto been told to do so.

(on Slackware) the PCMCIA configuration information resides in /etc/pcmcia - it should be somewhere similar for RedHat. In there you should find a network script and a network.opts configuration file. You'll want to edit the network.opts file.

Bascially what it is is a big "case" statement, with the variable determining the configuration being your PCMCIA scheme, socket the card is inserted into, instance and hardware (MAC) address. On my particular setup I don't do anything crazy -- I don't look at anything but MAC address.

You'll see something like case "$ADDRESS" in
*,*,*,*)
[bunch of stuff]

what that is saying is that "any scheme, any socket, any instance, any MAC address" -- in other words any ethernet adaptor.

Within the configuration I have 'DHCP="y"' -- that should signal the network script to run dhcpcd on that interface.

Hope this helps.
 
Old 04-24-2002, 10:37 AM   #3
feaz
LQ Newbie
 
Registered: Apr 2002
Location: Jacksonville, FL
Posts: 11

Original Poster
Rep: Reputation: 0
That's exactly what I need... :-) THank you.

So, who do you recommend? Slackaware, I take it?

I don't have that, although I do have a copy of Mandrake.
-- Jim
 
Old 04-24-2002, 10:56 AM   #4
akohlsmith
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 114

Rep: Reputation: 15
Distributions

It really depends on what your purpose for using Linux is.

Personally I love slackware because it is as bare metal as you can get without going to LFS. Gentoo is competing with it strongly though, and I find my will weakening. :-)

If you just want it up and running and really don't want to screw with anything, I have heard that Suse and Mandrake are pretty decent.

My major gripes against RedHat are in its configuration and its packages. RPM is a pain in the side of any administrator, no matter what the distribution (Mandrake uses RPM too and I think SUSE does too) -- Gentoo eliminates these problems by using BSD's idea of 'ports' -- a package which you have to compile and install. This usually gets you better binaries but I haven't really used it to see if you run into package dependency hell. I hear that Debian's packages eliminate these woes.

As you can likely guess, I have not tried many of these other distributions; I found Slack early on and maybe I'm just getting old and crotchety as I age but it has never let me down. Compiling source is not a big deal (especially these days with the autoconf/automake-generated "configure" scripts!) and having the familiarity with the system to do basic maintenance and fixing has saved me countless hours of screwing around looking for help.

I would say that Slackware is like the used car market -- you don't get the perks up front but by having knowing how to check it over past "kicking the tires" you learn a few things and it makes you a better overall driver. Other distributions tend to hide the system from you, relying instead on wizards and special configuration hierarchies that go absolutely haywire if you touch them manually.

Like I said, Gentoo is having a good run at bending my will. It seems to be everything that Slackware is but "livlier" -- hell maybe the install scripts are a bit friendlier too. :-)
 
Old 04-24-2002, 01:31 PM   #5
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Re: Distributions

Quote:
Originally posted by akohlsmith
II have not tried many of these other distributions
RedHat works fine for me. I want to try Debian though.
 
Old 04-24-2002, 01:39 PM   #6
akohlsmith
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 114

Rep: Reputation: 15
don't read too far into it

I wrote I have not tried them -- what that means is that I either became aggravated shortly after installation or otherwise did not give them more than a week's worth of consideration. Not necessarily "I'm going by heresay, c00ldude3532 on AOL sez it sux so I say so tooo!!!"
 
Old 04-24-2002, 05:04 PM   #7
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Smile Re: don't read too far into it

Quote:
Originally posted by akohlsmith
I wrote I have not tried them -- what that means is that I either became aggravated shortly after installation or otherwise did not give them more than a week's worth of consideration.
Just checking...
 
Old 04-25-2002, 03:58 AM   #8
L33t_H4x0R
LQ Newbie
 
Registered: Apr 2002
Distribution: Mandrake 9.0 (at the moment)
Posts: 28

Rep: Reputation: 15
feaz, another quick tip which applies to nearly all software you're going to run under Linux (and other *nix clones too) is that they tend not to report problems to the terminal you're typing away on.

If they did - it would mean that it would be harder to script them - since the scripting would have to take into account output from any command you issue.

Therefore - most linux commands tend to report things to the log files under /var/log when things go a bit wonky.

/var/log/syslog is your friend when you're trying to debug some new app that you've just decided to play with....

For myself, with my issues with diald at the moment a quick :

grep diald /var/log/syslog as root gives me reams more info than staring at the screen waiting for some error message that's not going to appear

Bry

PS - As for the debate on distros - I used to like slackware too - used it way back when the Version No. was < 3

But I like Mandrake these days - I'm not afraid of rpm
 
  


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 no ip address and netmask dont match route address pengy666 Linux - Wireless Networking 1 05-08-2005 09:33 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM
Should i use the eth0 ip address of my internet ip address when applying iptables ForumKid Linux - Security 2 01-03-2002 08:54 AM

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

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