# Whats wrong with my internet connection?![SOLVED]

## doubleagent

This is the best forum in the world and one can find the answer to just about anything if one will just look....

That's how I managed to solve my problem this morning!  :Very Happy:    Quick story:

Network connection works on LiveCD - yay!  But upon reboot, I get this (apparantly very common) error:

```

 *Bringing eth0 up via DHCP...[!!]

 

 *Error: Problem starting needed services.

 *"netmount" not started.

```

Anyhoo, I searched the forum for a week, trying many different 'fixes' that just didn't really 'fix' it.  Then I came across this thread.  In a comment made by RayDude, I found what I had been missing!  I added 'b44' and 'mii' to /etc/modules.autoload.d/kernel-2.6, rebooted, and guess what - IT WORKED!!!! :Very Happy:    I emerged coldplug, hotplug, logrotate and some other stuff and rebooted...just to see that friendly code scroll by again during the boot-up. :Smile: 

Now the problem.  Immediately after reboot, ye olde error message shows up again!!!  Not backing down, I log in as root and type 

```
#ifconfig eth0 up
```

  Good: No error.  Type 

```
#ifconfig
```

 and eth0 shows up, real messy and inoperable though.  Luckily, I had emerged dhcpcd off the livecd before I rebooted the first time, so 

```
#dhcpcd eth0
```

 and....prompt.  check with a 

```
#ping -c 3 www.google.com
```

 and I get 

```
ping:unknown host www.google.com
```

  I type 

```
#ifconfig
```

 only to find that dhcp did absolutely nothing.

I've been at this for a week and am at my wits end.  So far i've broken it, fixed it, and watched it break itself.  Its time for some more personalized help...PLEEEEAAASE!!!!

edit:  I'm going to need ndiswrapper for my network card, so, believe it or not, my modem is hooked directly to the computer through an ethernet cable.

----------

## moleculardeconstruction

I had a similiar problem when installing Gentoo on older machines with old network cards. The only way I could networking with the livecd was to set a static IP, subnet mask, and gateway manually. When I had built the system, including the installation of dhcpcd, the networking started on boot retreieving an IP from the router.

If you have the information for your router you can enter the information using:

```
 net-setup eth0 
```

Then this is what I did:

Manually set an IP address

IP address: 192.168.1.5

Broadcast address: 192.168.1.255

Subnet Mask: 255.255.255.0

DNS: 192.168.1.1

Gateway: 192.168.1.1

Hope this is helpful.

----------

## doubleagent

Thanks moleculardeconstruction,

There are couple of reasons not to do this:

1. I don't have old hardware: everything is about a 6-12 months old.

2. DHCP worked on the liveCD (yep, that's what it uses), so there's no reason it shouldn't work off the hard drive.

That said, I tried it anyway (i'm desperate).  First I booted the liveCD to make sure I had all the information.  Then I rebooted the OS and...

typed in 

```
#net-setup eth0
```

 and got 

```
-bash: net-setup: command not found
```

  Simple solution: find it!  however, 

```
#locate net-setup

#slocate net-setup
```

 return absolutely nothing.  Still not giving up, I opened /etc/conf.d/net  and modified the contents there to have all the correct information.  reboot.  nada.  No error, though, and, not surprisingly, the ifconfig output is much prettier.  But 

```
#ping -c www.google.com
```

 still returns 

```
ping: unknown host www.google.com
```

  I'd still be willing to give it another go if someone would tell me how to identify the gateway number.  I had to guess b/c I couldn't find it and Windows will return a different gateway (b/c its using the card).

thanks again though....

----------

## RayDude

Most of this stuff is basic and you probably already tried, but what they hey you never know...

Can you ping localhost?

Can you ping 127.0.0.1?

If you assign a fixed IP can you ping your own IP address?

If you can do those things, then do a ping the IP address of your broadband modem and see if that works.

Then try ping 68.142.197.88

That's www.yahoo.com, if that works and ping www.yahoo.com doesn't you have DNS issues. One thing that's important, the default /etc/conf.d/net has a fixed IP addy for eth0, you need to comment out that line before you enable dhcp. I've also noticed that people change the dhcp parameters to increase the time for dhcp addy issue with a -t 30 (makes it 30 seconds).

Can you post the output of 'ifconfig' so we can see what your system thinks it has.

Also, did you make sure you have absolutely the same drivers enabled in your kernel as are used on the boot cd?

Raydude

----------

## doubleagent

Thanks RayDude,

I tried a few varieties of pinging like you said.  Of course pinging the local host worked, but when I pinged my IP I got 

```
network is unreachable
```

  Heres the ifconfig you wanted:

On the hard drive, ifconfig will just return Io.  If i run 

```
#ifconfig eth0 up
```

 and then ifconfig, I get:

```

eth0

Link Encap: Unspec

HWaddr: 5B-4F-C0-00-3F-FF-FF-FF-00-00-00-00-00-00-00-00

UP BROADCAST RUNNING MULTICARD

Metric: 1

RX Packets: 0 errors:0 dropped:0 overruns:0 frame: 0

TX Packets: 0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000

RX bytes: 0(0.0 b)

TX bytes: 0(0.0 b)

```

To be fair, I ran ifconfig on the livecd so I could show you guys what it should look like:

```

eth0

Link Encap: Ethernet

HWaddr: 00:0D:56:B6:78:68

inet addr: 192.168.1.255

Bcast: 192.168.1.255

Mask: 255.255.255.0

UP BROADCAST NOTRAILERS RUNNING MULTICAST

MTU: 1500

Metric: 1

RX Packets: 18 errors:0 dropped:0 overruns:0 frame: 0

TX Packets: 8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000

RX bytes: 2212 (2.1 kb)

TX bytes: 2102 (2.0 kb)

interrupt: 17

```

 *Quote:*   

> Also, did you make sure you have absolutely the same drivers enabled in your kernel as are used on the boot cd?

   I should: I used genkernel....

Also, I noticed this and thought I'd ask about it.  When I boot I see:

```

populating /dev with device nodes

 eth1394:eth0:IEEE-1394 IPv4 over 1394 Ethernet (FW-host0)

```

which is fine, but it bothers me b/c it precedes the module loading process, where I get b44 and mii to run off /etc/modules.autoload.d/kernel-2.6.

To get this particular message written down I had to reboot 3 or 4 times, and the third time I got:

```

*Bringing eth0 up via DHCP...[ok]

 eth0 recieved address [wouldn't you like to know]

```

but it did'nt happen again.

Is my network just working when it wants to? whats going on?  I have a feeling though that time may actually be a factor, so could you tell me where to put the '-t 30.' to increase the time.

We may be getting somewhere....

----------

## RayDude

 *dfitzpat wrote:*   

> Thanks RayDude,
> 
> <snip>
> 
> which is fine, but it bothers me b/c it precedes the module loading process, where I get b44 and mii to run off /etc/modules.autoload.d/kernel-2.6.
> ...

 

In the past I had an issue with 1394 interfering with stuff, but I don't remember it messing with ethernet. You could try disabling it.

Please note, I'm using the latest baselayout. I get it by doing this:

```
echo 'sys-apps/baselayout ~x86' >> /etc/portage/package.keywords
```

I'm using the latest base layout so I can use its wireless configuration support.

dhcp options go in the file /etc/conf.d/net, mine looks like this:

```
iface_eth0="dhcp"

dhcpcd_eth0="-t 30 -N"

iface_ath0="dhcp"

dhcpcd_ath0="-t 30 -N"

essid_ath0=""MY_SSID"

channel_ath0="6"

key_MY_SSID="MY_HEX_KEY open"
```

Let me know how it goes.

Raydude

----------

## RayDude

Thought of one other thing: (actually saw it in another thread)

Have you been using 

```
/etc/init.d/net.eth0 start
```

 to bring up your ethernet?

That's the script you want to use. ifconfig eth0 up does not run dhcpcd. Although you could run it yourself after you do the ifconfig eth0 up.

Raydude

----------

## krinn

dfitzpat: 

Easy

Network unreachable

Error in routing table, your route table is invalid check & fix it

```

route

```

general usage with a router 

```
route add default gw xxx.xxx.xxx.xxx (router ip)
```

Unkown host

Error in DNS resolution

edit /etc/resolv.conf & put some valid DNS IP.

----------

## doubleagent

Thanks for all the help: These forums truly are great.

First things first.  RayDude:

I tried adding "-t 30" and "-t 30 -N" (didn't know what the -N did) to /etc/conf.d/net and rebooted both times: nothing happened.

On a brighter note: I am using /etc/init.d/net.eth0 on boot-up for my connection - thanks for finding it! :Smile:    I tried a couple of things:

```
#/etc/init.d/eth0 start
```

 returned 

```
 *Bringing up eth0 via DHCP[!!]
```

 (which is how I know this script runs at boot: the output is the same minus the netmount stuff)  Then I rebooted and tried with the eth0 actually in ifconfig and got a completely different message, but nonetheless unhelpful.  ie.)

```

#ifconfig eth0 up

#/etc/init.d/net.eth0 start

 *Keeping kernel configuration for eth0

```

I looked at the code some, but I'll need some time to actually sit down and read it.  Luckily its all top-down and looks like a bash script.  Maybe python.  (I don't know any bash and only a little python)

krinn - I'm glad you find it easy: I would too...in fact I'd find it fun to try and fix this problem if it wasn't for the fact that it's keeping me from getting anything done.  Anyhoo.  I took one look at that route command and saw that I needed to know the gateway number.  If you'll recall:  *Quote:*   

>  I'd still be willing to give it another go if someone would tell me how to identify the gateway number. I had to guess b/c I couldn't find it and Windows will return a different gateway (b/c its using the card). 

   It'd be great if you could tell me how to identify it. :Smile:    Also, I took a look in /etc/resolv.conf and the contents were:

```
domain homenetwork
```

 which is exactly what it should hold since that's the name I gave it when I installed gentoo.

Anyway, thanks again.  Too bad it's still not working, but I think we're getting closer.

----------

## doubleagent

 *Quote:*   

> krinn - I'm glad you find it easy: I would too...in fact I'd find it fun to try and fix this problem if it wasn't for the fact that it's keeping me from getting anything done. Anyhoo. I took one look at that route command and saw that I needed to know the gateway number. If you'll recall: *Quote:*   
> 
> I'd still be willing to give it another go if someone would tell me how to identify the gateway number. I had to guess b/c I couldn't find it and Windows will return a different gateway (b/c its using the card). 
> 
> It'd be great if you could tell me how to identify it. 

 

That statement may be misguided.  You wrote

```
route add default gw xxx.xxx.xxx.xxx (router ip)
```

  meaning that I should type in 

```
route add default gw <router ip>
```

  Sorry about that: I was thinking gw stood for gateway and then router ip was where I put the router ip...all very confusing.  Anyway, I'll try it and do it right this time.

-------------------------------------------------------------------------------------------------------

Tried it.  I ran 

```
#route add default gw <router ip>
```

 and got 

```
SIOCADDRT: Network is unreachable
```

  Too bad.  I was hoping it would work.  Well, there's next time....

----------

## doubleagent

Something I just now noticed.  Why is my inet addr in ifconfig on the livecd 192.168.1.255, but the only time that DHCP has worked was when it was  :Very Happy:  ????  Is it temporary (static, non-static or whatever thats called)?

----------

## RayDude

 *dfitzpat wrote:*   

> Something I just now noticed.  Why is my inet addr in ifconfig on the livecd 192.168.1.255, but the only time that DHCP has worked was when it was 192.168.1.101????  Is it temporary (static, non-static or whatever thats called)?

 

Have you looked at 'dmesg' output and the text file '/var/log/messages'? for more clues as to what won't work?

It really sounds like you should be assigning the IP by hand in /etc/conf.d/net to see if that works. It could be a DHCP incompatibility. (M.S. DHCP? Hmmm)

You'll need to know your gateway. Do you have a windows box running on the network? You could run IPCONFIG -a to figure out the gateway and the DNS servers that your DHCP master is sending out.

Also, could you explain your setup a bit? I'll explain mine as an example:

I have a DSL modem connected to my phone line, the DSL modems 10 Base T cable is connected to the WAN port of a wireless router (DLink DL624), then my Gentoo boxen are connected via ethernet (or wireless) to the DL624.

The DL624 acts as a firewall and a DHCP server.

I don't have any packet filtering enabled in any of my Gentoo boxen. (disabled in kernel, save memory)

Are you using /devfs or udev?

If we knew more about your setup, maybe we'd get some more ideas for things you could check.

My guess is: its a kernel or /dev problem.

RayDude

----------

## nuke235

This may be a dumb question, but some DSL networks (like sympatico here in Canada) use PPPoE.  Do you maybe need to set that up instead?

Also, are you actually using a router?  Because if you don't have a router, then your default gw is not 192.168.1.1 (if you were using a Linksys router), or 192.168.0.1, if you were using a Dlink or Netgear.

----------

## doubleagent

My setup:

I have a RCA digital broadband cable modem (model DCM425) hooked with an ethernet cable to a Linksys router (812.11g, Model WRT54GS).  From there I have an ethernet cable that goes directly into my computer.  I also have a wireless network card that I use on the same computer that goes to the same router.  The reason I have two hook-ups?  Windows supports the card - Linux doesn't.

I hope this helps: the lack of internet is really incapacitating.

RayDude: Thanks: I'll try some of that stuff and let you know how it works out.

Nuke235: Thanks for the help, however, DHCP works on the livecd, and it has worked from time to time on the hard-drive.

----------

## RayDude

 *dfitzpat wrote:*   

> My setup:
> 
> I have a RCA digital broadband cable modem (model DCM425) hooked with an ethernet cable to a Linksys router (812.11g, Model WRT54GS).  From there I have an ethernet cable that goes directly into my computer.  I also have a wireless network card that I use on the same computer that goes to the same router.  The reason I have two hook-ups?  Windows supports the card - Linux doesn't.
> 
> I hope this helps: the lack of internet is really incapacitating.
> ...

 

The next time you boot up from the hard drive do an:

```
lsmod
```

 to show your modules. If you can, post that here.

If its empty, then there is definitely something wrong with your kernel modules (unless you have everything compiled into the kernel).

Raydude

----------

## doubleagent

Raydude,

I ran lsmod for the 100th time this week (no it's most certainly not empty), but this time I noticed something odd.  My network connection got noticed at boot-up once out of the ten or twenty times that I rebooted, and when I ran lsmod this time...something was different.

Here's the oddity.  First what happened when the network doesn't work:

```

#lsmod

...

ieee1394     3     eth1394, sbp2, ohci1394

...

```

And here's what happened when the network did work:

```

#lsmod

...

ieee1394     2     sbp2, ohci1394

...

```

What should I make of this?

I looked at dmesg.  When the network works, one of the last things on the list is a short list telling me that b44 worked.  When it didn't, I saw no reference at all to b44 (but I can testify that it always loads during the boot-up).

Also, the one thing I did manage to figure out was the gateway, as well as everything else.  The one time it worked, i ran ifconfig and route to get all the correct information.  Then I edited /etc/conf.d/net accordingly and it still didn't work.

This is getting really frustrating.  I thank you for all your help though and hopefully it'll work before the end....

----------

## RayDude

 *dfitzpat wrote:*   

> Raydude,
> 
> I ran lsmod for the 100th time this week (no it's most certainly not empty), but this time I noticed something odd.  My network connection got noticed at boot-up once out of the ten or twenty times that I rebooted, and when I ran lsmod this time...something was different.
> 
> Here's the oddity.  First what happened when the network doesn't work:
> ...

 

Okay, 1394 is interesting, but what I wanted to see was the modules for your ethernet driver.

Now the thing that gets me about your firewire is: maybe eth0 is your 1394 ethernet connection? I noticed when I booted my laptop (with 1394) on Gentoo RR, the ethernet came up as eth1, not eth0. I didn't bother to see what eth0 was, but maybe it was firewire?

So maybe you should be setting the eth1 parameters is /etc/conf.d/net? And doing a rc-update add net.eth1 default from the command line?

Or maybe you should remove 1394 ethernet from your kernel and reboot?

If that doesn't work, please show us all your modules, a complete copy of lsmod would be helpful. I can't figure out why the module would work once in a while. Did you check the connection on the card to make sure its snug?

RayDude

----------

## doubleagent

Thanks again RayDude,

Okay, I think the problem is pretty close to being solved.  But before I get to that, let me be good forum-user and give you what you asked for.

First, lspci seems to always be the same whether the connection works or not:

```

#lspci

...

0000:02:01.0  Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)

...

0000:02:04.1  Firewire (IEEE1394) Texas Instruments PCI4510 IEEE-1394 Controller

0000:03:00.0  Network Controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN controller

```

Second, lsmod has very small descrepencies.  Here's how it looks when the network is working:

```

#lsmod

yenta_socket  1

rsrc_nonstatic 1 yenta_socket

pcmcia_core   2 yenta_socket

evdev            0

rtc                 0

b44                0

mii                 1 b44

ahci               0

sata_qstor      0

sata_uli          0

sata_sis         0

sata_sx4        0

sata_nv          0

sata_via         0

sata_svw        0

sata_sil          0

sata-promise  0

libata             10 ahci, (all 9 sata's above)

dm_mirror      0

dm_mod         1 dm_mirror

sbp2              0

ohci1394        0

ieee1394        2 sbp2, ohci1394

s1811_hcd      0

ohci_hcd         0

usb_storage    0

usbhid            0

ehci-hcd         0

usbscore         7 s1811_hcd, ohci_hcd, uhci_hcd, usb_storage, usbhid, ehci_hcd

```

and here's how it looks when the network isn't working:

```

#lsmod

yenta_socket  1

rsrc_nonstatic 1 yenta_socket

pcmcia_core   2 yenta_socket

evdev            0

rtc                 0

eth1394         0

b44                0

mii                 1 b44

ahci               0

sata_qstor      0

sata_uli          0

sata_sis         0

sata_sx4        0

sata_nv          0

sata_via         0

sata_svw        0

sata_sil          0

sata-promise  0

libata             10 ahci, (all 9 sata's above)

dm_mirror      0

dm_mod         1 dm_mirror

sbp2              0

ohci1394        0

ieee1394        3 eth1394, sbp2, ohci1394

s1811_hcd      0

ohci_hcd         0

usb_storage    0

usbhid            0

ehci-hcd         0

usbscore         7 s1811_hcd, ohci_hcd, uhci_hcd, usb_storage, usbhid, ehci_hcd

```

Finally, the one piece of the puzzle thats missing, is the thing that differs greater than any other.  Here's what it looks like when the network is working:

```

#dmesg | grep eth0

eth0: Broadcom 400 10/100BaseT Ethernet 00:0d:56:b6:78:c8

b44: eth0: Link is up at 100 Mbps, full duplex

b44: eth0: Full control is on for TX and on for RX

NETDEV WATCHDOG: eth0: Transmit timed out

b44: eth0: Transmit timed out, reseting

b44: eth0: Link is down

b44: eth0: Link is up at 100 Mbps, full duplex

b44: eth0: Full control is on for TX and on for RX

```

and here's what it looks like when it isn't working:

```

#dmesg | grepeth0

eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet(fw-host0)

```

Spooky, huh?  Anyway, I can now actually predict whether the network is going to work or not.  When I see 

```
eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet(fw-host0)
```

 scoll by during boot-up, it won't work.  If I don't see it, it will.

Which brings me to [hopefully] the last question I'll ask you on this thread: How do I disable eth1394 from my kernel so that I don't see that message?

----------

## RayDude

I only know how to do it with make menuconfig... I don't know how to use genkernel.

```
cd /usr/src/linux
```

If that link doesn't exist, link your active kernel by typing:

```
cd /usr/src

ln -s linux-2.6.XX-XXXXX linux
```

Then in /usr/src/linux, type:

```
make menuconfig
```

When the menu comes up, use the keyboard arrow keys to navigate to "Device Drivers" and press return. Note: don't hit left or right, just up / down and return.

Then navigate to "IEEE 1394 (FireWire) support  --->" and press return.

Then down near the bottom, find "Ethernet over 1394 (NEW)" and uncheck it (that is no "*" or "M" in the <>).

Then hit the right arrow (notice it selected < Exit> on the bottom of the screen) and press return.

Do that until you exit the tool. When it asks if you want to save your kernel configuration, say "Yes".

Then at the command prompt do the following:

```
mount /boot

make && make modules_install && make install
```

If you have grub installed, it will be all ready to boot the new kernel.

If you have lilo installed it will prompt you "should I run /bin/lilo?"

Say yes and you'll be all set.

Raydude

----------

## doubleagent

RayDude

I cannot thank you enough man!  My Internet connection is finally working!

Although it's still a mystery to me why that init script for eth1394 would only run most of the time and not all of the time, I'm glad it didn't or else We wouldn't have seen the relation btwn it and my connection.

Thanks so much man!  This case is solved! :Very Happy: 

----------

## RayDude

 *dfitzpat wrote:*   

> RayDude
> 
> I cannot thank you enough man!  My Internet connection is finally working!
> 
> Although it's still a mystery to me why that init script for eth1394 would only run most of the time and not all of the time, I'm glad it didn't or else We wouldn't have seen the relation btwn it and my connection.
> ...

 

Glad to be of service.

----------

