# eth0 takes forever to "bring up"..

## miqorz

Recently during boot "eth0" takes upwards of 20 second to load..

I thought it had something to do with me emergeing "pump" but I remove it and nothing happends..

I use a Realtek onboard ethernet card with the 8139too module built in.. and dhcp.

It's never done this untill recently.. any ideas?

----------

## miqorz

I also noticed it brings up "lo" Ive never noticed that in any other distro Ive used.. could that be a problem?

----------

## PaV

it is usually slow with dhcp if it cant get the ip and stuff from it. maybe try just putting the values by hand into /etc/conf.d/net... maybe your isp has changed something... and btw lo should be there.

----------

## miqorz

Hmm its never been in slow in the past.. and I cant just set a perm setting because sometimes Im behind a router and sometimes Im not..

----------

## miqorz

```

mike@melvin mike $ /sbin/route 

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

loopback        melvin          255.0.0.0       UG    0      0        0 lo

default         launchmodem     0.0.0.0         UG    0      0        0 eth0

```

Hmm I noticed lo loads a boot.. think that could be causing eth0 to take forever to load?

----------

## miqorz

Eh Im sorry but I just noticed one more thing when I just rebooted (I emerged gnome..)

My DSL modem turned off and back on... is this normal at all?!

----------

## SuperSheep

lo's just the loopback adapter, or whatever the linux name for it is.  :Razz: 

I can't see why that would be slow to bring up. 

The times when my eth0 has been slow to bring up have been if I've had DHCP enabled in my config, but with no DHCP server on my network.

----------

## miqorz

dhcp server? I never set up a "server" but it was never slow before...

----------

## hensan

I have a similar problem. I dualboot gentoo/win98. Whenever I reboot gentoo->gentoo or gentoo->win98 everything works fine, but when I try to reboot win98->gentoo I get "Failed to bring eth0 up". I have to shut down the computer to get eth0 up in gentoo again, weird...

----------

## miqorz

It doesn't fail to bring up...

It just takes a long ass time. =\

----------

## SuperSheep

A router can be a DHCP server. Basically its just a device that will dole out IP address automatically to machines on the network. If you have DHCP enabled but nothing to give out address, then eth0 will ask for an address, then sit there and wait till it gets one.

Do you have a router or similar that's giving you the IP address? If not, then you'll need to set the IP address yourself.

----------

## miqorz

Well according to my networking guru friend my modem has "routing functions" which make uploading behind a router impossible...

----------

## bone

 *miqorz wrote:*   

> Well according to my networking guru friend my modem has "routing functions" which make uploading behind a router impossible...

 

This seriously does not seem like a valid statement, considering if your modem has "routing functions" it would seem to allow it to be configured more so you can upload behind it. Also, how can this be a factor in your eth0 coming up extremely slow. I would think that a problem between the link of the router/modem and your ISP's dslam/(forgot what they call it on cable internet networks) end. I would see if you could get another modem to try (borrow/buy/whatever). If this does not help, then I would contact your ISP. Also, make sure to use an approved brand of modem for your ISP. I have seen some offbrands flake out like this.Last edited by bone on Tue Apr 06, 2004 11:19 pm; edited 2 times in total

----------

## miqorz

I hope it's apporved by my ISP.. they sent it to us.

----------

## miqorz

Weird.. my net comes up in a matter of seconds with my router hooked up..   :Shocked: 

I guess I should figure out how to configure this mess to let me upload from behind my router.

----------

## bone

Ok. I guess we will go with your option    :Cool: 

----------

## miqorz

Well I just found another flaw of being behind my router..

I have to emerge-webrsync; A friend of mine suggested I buy a crossover cable.. is this a good idea?   :Embarassed:  I suck with networking..

----------

## bone

Not entirely sure why he would suggest that you buy a crossover cable. It would not be beneficial in your setup if I understand it correctly.

----------

## miqorz

He said that running a router with a modem with "routing functions" is like tryiing to run 2 routers basically..

Im open to ANY suggestions at this point because Ive spent the past 6 months trying to configure my router to the point where I can upload jack crap...

----------

## bone

Discribe to me, your network layout. Specifically which components your using.. IE.. router/modem/switch/pcs (what kind and all that, well, except pcs).

I will see what I can see wrong and or make some type of suggestions.

----------

## miqorz

Allright..

I have a phone line coming into my room from the kitchen which connects to my Westell Wirespeed DSL modem.

That connects to my D-Link Router.

Then from there it connect to my Gentoo Linux box and then the other to my brothers Windows XP box.

Also behind the router he can't check his Yahoo mail.. it just times out..

----------

## bone

Something tells me that you dont have everything set up correctly. I have used the Westell DSL modems and have never had a problem with them. I dont even remember the Westell DSL modems having "routing capibilities". I would have to say that your problems are isolated to your D-Link router setup.  I really cant go into detail about there here as the setup is different for each model. I would suggest contacting someone at D-Link support and seeing if they can help you.

Also,  I want to make sure, but yours and your brothers PC are both connected to the LAN ports on the D-Link router, correct?

----------

## miqorz

Correct.. and we tried calling D-Link AND our ISP...

Neither was much help at all..   :Mad: 

I used fedora and slackware and debian before.. all started my network fine at boot.. i dont understand why this would be any diffrent. all used dhcp and dhcpcd.

----------

## bone

Please post the following files and I will see if I can help you figure this out:

/etc/conf.d/net

/etc/conf.d/dhcp

Also, the following statement below, troubles me. Your DSL modem should not just turn itself off without you physically doing it, or the power being lost. You might want to try turning the DSL modem off, and leaving it off for 5 minutes (to clear and recycle itself) and then turn it back on, and try again. 

 *Quote:*   

> 
> 
> miqorz  	
> 
> Posted: Tue Apr 06, 2004 7:20 am    Post subject:
> ...

 

Also, can I get the output from the following statement:

/sbin/ifconfig eth0

----------

## Rainmaker

and try this:

/etc/init.d/net.eth0 restart

then post then output of

tail -n 50 /var/log/messages

Should tell us what the dhcpclient receives, from who and when

----------

## miqorz

/etc/conf.d/net

```

# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

                                                                                                                     

# Global config file for net.* rc-scripts

                                                                                                                     

# This is basically the ifconfig argument without the ifconfig $iface

#

#iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

                                                                                                                     

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

#iface_eth0="dhcp"

#dhcpcd_eth0="..."

                                                                                                                     

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

                                                                                                                     

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.  Leave commented to assign

# defaults for that interface.

#

#broadcast_eth0="192.168.0.255 192.168.0.255"

#netmask_eth0="255.255.255.0 255.255.255.0"

                                                                                                                     

                                                                                                                     

# For setting the default gateway

#

#gateway="eth0/192.168.0.1"

                                                                                                                     

iface_eth0="dhcp"

```

I dont seem to have an /etc/conf.d/dhcp

My ifconfig while not behind my router.

```

root@melvin mike # /sbin/ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:40:CA:4A:A3:BE

          inet addr:192.168.1.97  Bcast:255.255.255.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2106 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2121 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1321124 (1.2 Mb)  TX bytes:191248 (186.7 Kb)

          Interrupt:18

```

----------

## Suicidal

 *miqorz wrote:*   

> Eh Im sorry but I just noticed one more thing when I just rebooted (I emerged gnome..)
> 
> My DSL modem turned off and back on... is this normal at all?!

 

Loosing sync maybe? could indicate a bad line, have the telco test it.

It could also be that your dhcp client is requesting it's old IP and the telco DHCP server is refusing to issue it back because it has already issued it to another client.

If you have a hub (not switch - wont work) and another computer plug them into the hub and then from there into the DSL modem then run ethereal during boot up to see what is going on.

Also what do you mean sometimes you are behind a router and sometimes you are not? Is this a laptop? If so that could explain the long time to init eth0 as it is probably trying to contact a dhcp server that it cant reach.

----------

## theJupiter

I have the same problem when bringing eth0 up in boot. I've been having this problem since I recompiled my kernel with IPv6 support. It looks for a IPv6 router (which I don't have) and I believe that's why it takes so long.

Can I disable IPv6 in net.eth0 whithout having to recompile my kernel?

p.s this problem isn't consistant, sometimes it actually loads fast

----------

## sabaisabai

I had the same long delay with my 2.6 boot, but I didn't previously have the problem with 2.4.  The only difference I could find was that 2.4 used a *module* for my modem driver (b44).  So I changed the 2.6 config to include b44 as a module rather than build it in, and this has solved the problem  :Smile: 

I don't know why it would solve it though, but I'm not compaining.

I too would like to know whether it's safe to disable IPv6 in the kernel, because it's causing a second problem that I've yet to solve - slow DNS lookup in mozilla/firefox.

[later]

Disabling IPv6 support solved the DNS lookup problem and caused no adverse effects.Last edited by sabaisabai on Fri Jun 11, 2004 4:01 pm; edited 1 time in total

----------

## theJupiter

good point there, I also didn't have this problem with 2.4 but as far as I remember I had the same settings for my networkcard in that kernel.

My current 2.6 kernel has the driver (8139too) for my RealTek RTL-8139 built-in. in /var/log/messages i have:

```
Jun 11 13:12:50 jupiter eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

Jun 11 13:13:00 jupiter eth0: no IPv6 routers present
```

and ifconfig gives me:

```
eth0      Link encap:Ethernet  HWaddr 00:10:DC:2E:7C:66

          inet addr:192.168.2.100  Bcast:192.168.2.255  Mask:255.255.255.0

          inet6 addr: fe80::210:dcff:fe2e:7c66/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2140 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2203 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:2011642 (1.9 Mb)  TX bytes:343550 (335.4 Kb)

          Interrupt:21 Base address:0xc800

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:60 errors:0 dropped:0 overruns:0 frame:0

          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:3000 (2.9 Kb)  TX bytes:3000 (2.9 Kb)
```

I think looking for an IPv6 router causes the delay, I've yet to try disabling IPv6 support.

----------

