LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Determining IP information for eth0...FAILED (https://www.linuxquestions.org/questions/linux-networking-3/determining-ip-information-for-eth0-failed-16880/)

chappy011 03-23-2002 04:17 PM

Determining IP information for eth0...FAILED
 
Hey there,

I am a linux newbie and am having problems connecting my linux box to the internet.

My setup is this: I get internet access through a cable modem (Road Runner, to be specific). The modem goes to a 4-port hub. One of the ports in the hub is connected straight into the ethernet card in my linux box. This setup works fine with my Windows computer. However, it is not working with linux (Redhat 7.2).

When I boot the computer up, it pauses on the line 'Bringing up interface eth0'. After a couple minutes, it finally prints out 'Determining IP information for eth0...FAILED'. Then when I finally log into linux, the Internet does not work.

I tried running the 'ifconfig' command, and this produced only a result for the interface 'lo', not for 'eth0'.

I am really new to linux, so I am not sure where to go from here. I have been searching the forums for a problem like mine, but haven't found anything quite the same. Any help you could provide, whether it be advice or just links to something you think would help, would be greatly appreciated.

Thanks!

trickykid 03-23-2002 05:03 PM

http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html

the almighty ethernet howto should get you started.

-trickykid

finegan 03-23-2002 06:56 PM

Try:

ifconfig eth0 up

If it errors and says... no device by that name found, then yeah, hit the ethernet how-to because you have to get your card working first. If it doesn't error, then you're not having your card ask the right questions on boot.

What is RR's method of connection? dhcp or pppoe?

Cheers,

Finegan

chappy011 03-23-2002 07:25 PM

I tried 'ifconfig eth0 up' and did not get any error.

Afterwards I did 'ifconfig' again and then there was en entry for eth0 (in addition to the one for lo that was there before). I tried using the internet again and it still did not work, though.

So, I guess I'm not having my card ask the right questions on boot. I am pretty sure that RR uses DHCP. When I installed Red Hat, I selected the 'Configure using DHCP' option.

Thanks for the replies!

Chappy

finegan 03-23-2002 07:45 PM

Roadrunner may require that you accept their hostname or something funky like that, there are a few on the market that do. If:

dhcpcd eth0

Doesn't work then I recommend searching through the archives here by ISP in order to figure out if you have to pass some cutsie option ot dhcpcd.

Cheers,

Finegan

chappy011 03-23-2002 09:53 PM

I was looking around the forums on the Red Hat web site when I came across a posting that suggested to turn off the computer and unplug the cable modem for a few seconds. So I did this, then plugged it back in and turned the computer on and - voila! No more error.

Does anyone know why this would solve the problem? I don't really understand why it worked at all.

So now that the internet is working, I have another (minor) problem. When I turn the computer on, I am taken to the text login screen (I had been using the graphical login screen). If I use the 'startx' command to log into GNOME, I am given the error message 'Could not look up internet address for dhcp-254-130'. This will prevent GNOME from operating correctly. It may be possible to correct the problem by adding dhcp-254-130 to the file /etc/hosts.' However, if I continue to log into GNOME, I can still access the internet just fine.

So, I guess I have to edit the /etc/hosts file for GNOME to stop giving me this error message. Do I just need to add a line with the IP address and the hostname? I found the IP address using the ifconfig command - it is 24.25.134.95

Right now my /etc/hosts file just contains this line:
127.0.0.1 localhost.localdomain localhost

So I need to add a line like this?
24.25.134.95 dhcp-254-130

2 questions -
If my IP address is dynamic, then it doesn't seem right to be putting a static IP address in the hosts file. Won't it just be incorrect eventually when I get a different IP address?

The entry I already have in my hosts file has three parameters - IP Address, Hostname, and Alias. I only have the IP address and Hostname parameters for my ethernet - do I need to include an Alias? If so, how do I know what to put?

Thanks very much!

finegan 03-23-2002 10:37 PM

The problem comes from the fact that X-windows is also a server, so it wants to know what address its going to be offering services on. Really, you could put an entry in /etc/hosts, but that might just confuse a number of other daemons.

My laptop, which could have about 1 of 15 ip addresses depending on which network I'm dealing with, has an entry for my home LAN 192.168.0.9 I think, and the error goes away, but really if your not going to use X as a server, just ignore the error.

Cheers,

Finegan

trickykid 03-24-2002 12:40 AM

roadrunner modems keep a cache memory of the last mac address it was connected to. most likely you had to reset the modem so it loses memory of the last mac address it was connected to. in your case did you bypass the hub and do a direct connection ?? if your going thru the hub and only purchasing one IP from RR, then that would have been the problem in your case.. and resetting the modem and doing a direct connection is what allowed your linux box to attain the IP from the dhcp server..

-trickykid

chappy011 03-24-2002 08:32 AM

Actually, I did not make a direct connection at all between the cable modem and the linux box. It has always been connected through the hub. All I did was unplug the cable modem for a minute.

I am not sure how many IP addresses Road Runner gives me. I just get the standard RR package. So if Road Runner only gives me one IP address, and I split the connection 4 ways with a hub - do all 4 computers have the same IP address?

trickykid 03-24-2002 10:57 AM

No, standard RR only give you one IP which in turn only one computer will then attain the IP. Then most likely in your case, when you unplugged the modem, the computer that was connected lost the IP and when you turned on your linux box, it grabbed the IP after the reset. The only way you can share one IP is to use a router and have a internal LAN setup, you shouldn't be getting 4 IP's from roadrunner...

-trickykid

bbenz3 03-24-2002 05:59 PM

I currently have Road Runner in the Orlando area and they changed their policy here and allow up to 3 IPs assigned through dhcp but they are bascially static IPs (ie mine hasn't change in over 3 months). You would have to check with your local RR CSR to find out how they setup your area. Otherwise you have to either build a router (using linux) or buy a DSL/Cable Router from a store to get more than one computer online at a time.

trickykid 03-24-2002 06:06 PM

Quote:

Originally posted by bbenz3
I currently have Road Runner in the Orlando area and they changed their policy here and allow up to 3 IPs assigned through dhcp but they are bascially static IPs (ie mine hasn't change in over 3 months). You would have to check with your local RR CSR to find out how they setup your area. Otherwise you have to either build a router (using linux) or buy a DSL/Cable Router from a store to get more than one computer online at a time.
you probably don't have static IP's, just that they do rarely change ever.. I work for RR down in Austin. I have had the same IP assigned as DHCP for the past 6 months.. I have seen it take up to a year for some to ever change on them.
but that is cool they give each person 3 IP's, most areas only one.. got to love that Cable/DSL router to solve that for more connections.

-trickykid

bbenz3 03-24-2002 06:17 PM

Well I still had to build myself a router for my connections. We (myself and two roomates) have 4 computers running with a possiblity of about 6-7. Therefore 3 IPs doesn't make it. But for online gaming purposes you absolutely can't beat it. The fact that we can play in the same game at the same time and have no lag rules.
As for the IPs being static that is basically what I meant, However it does seem odd that even if we turn the cable modem off for at least a day that we still get the same 3 IPs back. I don't know how to explain it but it is fairly nice.

finegan 03-24-2002 06:31 PM

Check through dhcpd a bit. The typical default is to reserve an IP for something like 24 hours before recycling it. Most dhcpd servers are built around the same principles, so even if RR isn't using the same dhcp software as linux (likely), then its probably still keeps a database of leases and a period of time before it will remove your mac address from the lease history.

Cheers,

Finegan

bbenz3 03-24-2002 11:17 PM

Quote:

so even if RR isn't using the same dhcp software as linux (likely), then its probably still keeps a database of leases and a period of time before it will remove your mac address from the lease history.
RR uses a cable modem that has a built in cache that stores the mac addresses locally and so it will actually keep them indefinitely until you cycle power on the modem itself.

netdemon 05-16-2002 01:40 AM

RoadRunner in the Albany, NY area also allows 3 IPs. They are not technically static ips, but they won't change unless you disconnect. I really wish IPV6 was implemented by ISPs. It is annoying having to set up dynamic dns for my web domain. If IPV6 was implemented, we could have as many IPs as we wanted. Also, it would make it easier for those times you have to recover your IP for whatever reason (It could be memorized). But, oh well... *sigh*

I had a similiar problem and I found that connecting it directly to the modem was the only way once. Then I reinstalled redhat and connecting it through the hub and resetting the modem worked the other time. Go figure.

I am also having that problem:
"Could not look up internet address for dhcp-xxx-xxx this will prevent gnome... etc"
(x represents a number)

I have no clue how to solve that.

I also connect through SSH to my X server on the Linux box in NY (currently) from my Windows machine in CT.

After I enable X11 packet forwarding on SecureCRT (an SSH client), I get the following upon logon:
/usr/X11R6/bin/xauth: (stdin):1: bad display name "dhcp-xxx-xxx:10.0" in "add" command


I have to manually set the DISPLAY=localhost:10.0

Afterwards, X programs appear on X-Win32 (gedit, xterm), but not the gnome desktop itself.

Running gnome-session - I get the error aforementioned about problem running gnome (which locally doesn't affect anything except for an annoyance).

remotely, though... I get the following error after I click continue and gnome fails to load on X-Win32:

SESSION_MANAGER=local/dhcp-xxx-xxx:/tmp/.ICE-unix/2753
Gdk-ERROR **: X connection to localhost:10.0 broken (explicit kill or server shutdown).

startx gives me this:

(~)> startx
hostname: Unknown host


Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.


When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
Please report problems to xfree86@xfree86.org.

xinit: unexpected signal 2

Couldnt get a file descriptor referring to the console




What I think is this might be related to the dhcp-xxx-xxx problem for gnome somehow... as in - maybe caused by the same problem.

Someone from irc.openprojects.org #redhat said that their isp comcast.net doesn't use client-id and to try the following in:
/etc/sysconfig/networking/devices/ifcfg-eth0
add line:
DHCP_HOSTNAME=blah
and restart network

Unfortunately, that didn't work.

This is my /etc/hosts file:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

netdemon 05-16-2002 01:48 AM

I found the fix:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain dhcp-xxx-xxx

Where dhcp-xxx-xxx is your hostname when you type the hostname command.

It still didn't allow me to login to gnome remotely, but at least I got passed the error message before I got the sockets error :-)

mikek147 05-16-2002 03:56 AM

A couple notes here.

When a dhcp client requests an identity, it gets a lease time, say 24 hours. Once a client receives a lease, every 12 hours therafter, it will request a lease renewal. On dialup ppp type connections, this lease time is quite short, allowing for ip reuse for another client. In the case of cable/dsl, this lease time is long. This cuts down on renewal request traffic.

In order to get around the single ip from an ISP, install an Ethernet Cable/DSL router, in my case a Linksys BEFSR41 $80 US. The router takes the single ip from the ISP on the internet side of the router, and provides a dhcp server, independant of your ISP, for a private network, generally 192.168.x.x. With this method of internet connection, you could potentially have 254 hosts on your private net. This also allows you to set a static ip for your linux hosts, more perferable than dynamic ip. In my case, I set my Linux box and my network printer to 192.168.1.10 and 192.168.1.50, respectively. While my MS PCs use DHCP in the range of 192.168.1.100-150.

Hope this helps. -mk

netdemon 05-24-2002 06:55 AM

It only was a temporary fix!
 
My hostname changed, and now it didn't work any more. I don't want to have to edit that file every time the hostname (dhcp-xxx-xxx) changes. So, I changed /etc/hosts back to:

127.0.0.1 localhost.localdomain localhost

And now I am looking for answers again :-(

This seems to be a bug in Linux. I am a newbie though, so I have no clue.

netdemon 05-26-2002 10:34 PM

I am now in Connecticut on a different cable service and I am still having the same problem.

biggiefatts 05-26-2002 11:37 PM

netdemon...I myself am pretty new to Linux also. I am however familiar with networking in general. What I would suggest as a quick and simple fix is the samething that Mikek147 suggested a couple posts ago. If you have the means to purchase a Cable/DSL router, it will solve all of your problems. With the router you can assign a static private IP address to your Linux box. This way, if your Interent IP with RR changes you don't have to worry about it. The router will pick up the new address and everything will work the same without interuption. I use A LinkSys 4 port Cable/DSL router. The price has really come down on it lately and it is very simple to set up. If you would like to see some screen shots of the sett up program click here:

http://www.archide.com/~dave/linksys/index.html

If you have any questions please feel from to email me directly through the message boards.

PS: excuse the fact that the screen shots are coming from a windows machine. :D I still haven't gotten used to using GIMP so I used Photoshop to make the shots.

netdemon 05-27-2002 12:46 AM

Very strange..

I went into the Redhat Network Configuration program "neat" and went into the DNS section and removed the settings for domain, and Primary and Secondary DNS (which I must have manually set once upon a time) and the problem is gone :-)

BTW - Since Cox Cable only allows one IP, I was planning to get a router (but one capable of IPV6), etc etc. I am anal, though, and wanted to figure out what the problem was first in case I ever encounter it again.

netdemon 06-02-2002 11:05 PM

I patched my kernel, and the problem returned again. :-(

See also:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=55173


All times are GMT -5. The time now is 09:06 AM.