# no dhcpcd [SOLVED]

## koroumel

Greetings to all!

Till now, when my Gentoo booted, I had to :ifconfig eth0 up and dhcpcd eth0 -s 192.168.0.3 (cause of the typical netmount problem  :Evil or Very Mad:  ). Last night I emerged azureus. While in -p, I didn't like what I saw, since I didn't want everything related to java+linux installed in my machine but I thought what the heck, I'll give it a try. I let it emerge overnight and in the morning I halted and went to work. On my return I booted and realized that when I run dhcpcd, it stays there and never return to a prompt  :Confused:  . I tested with dhcpcd, dhcpcd eth0, dhcpcd eth0 -s 192.168.0.3. With ifconfig eth0 up, I have the normal reaction of the PC as before.

Any takers  :Question:   Thnx in advance  :Exclamation: 

:EDIT: I tested : 2004.0 minimal, 2004.1 minimal-universal & Knoppix 3.4 and it does not work. It worked before 2 days but now it isn't. Till now I had to : ifconcig eth0 and dhcpcd -s 192.168.0.3 and it worked in ANY of them. The only thing I changed was installing azureus, but I don't understand how this affect the live cds!

----------

## koroumel

 :Shocked:  There must be someone that can answer    :Sad: 

----------

## koroumel

Nice one!

It's been a whole day since I posted and there have been no one that is willing to help! I'm forced to use Windows XP because suddenly every linux distro I own refuses to run dhcpcd.

----------

## Fortean

 *koroumel wrote:*   

> Nice one!
> 
> It's been a whole day since I posted and there have been no one that is willing to help! I'm forced to use Windows XP because suddenly every linux distro I own refuses to run dhcpcd.

 

First of all, try rebooting your router and see if it a DHCP server problem rather than software. Second, can you please post the output of ifconfig? 

Also, perhaps you should be more patient when asking a question, people are not exactly paid to answer each and every question that appears in these forums, especially when they think it is a problem beyond what they are able to solve.

----------

## koroumel

Forteam, you're right, I should be patient, but how patient can one be while using Wee&Doze XPee  :Question: 

 In any case, I'll post the ifconfig & net.eth0 when I return from work, I restarted the router last night, just in case, since there was no problem with windows. Since this morning, I'm thinking of something  :Idea:  , how can affect my network if the dhcp server in my router (speedtouch 510) is enabled...i set it to be off but after an ip change from isp who knows  :Confused:  . 

And something else, till now I've followed the direction of the install document to configure my network by hand, but I never succeeded, the "network" is always "unreachable" (I edit net.eth0,resolv.conf,hosts)! When I dhcpcd with the same values I use to configure the net, it is reachable! I prefer static settings for my network but it seems that only dhcpcd did the job.

Thnx for reading through this!

----------

## RAPUL

which is your network card?

what dmesg says about it.

Why you had to setup it by hand?

----------

## koroumel

I have a via-rhine, the module is loaded on bootup (though I have the common netmount problem).   :Sad: 

Because of the netmount, the network was not started, so I used to do:

```
#ifconfig eth0 up 
```

(this still work as it was before,shows some packets transmitted but nothing received..reasonable),proper interfaces and stuff also.

```
#dhcpcd eth0 -s 192.168.0.3
```

 (I used to get an istant prompt and the network configured (in contrast with now that I wait 60 seconds to get a "failed" report)...still this would overwrite my dns in resolv.conf... so)

now ifconfig showed packets received, and for ex. ping 66.102.11.104 shows results like 128ms, but not for google.com (also reasonable)

```
#nano -w /etc/resolv.conf 
```

(change 192.168.0.1 to 10.0.0.138)

and that was it, it worked like a charm untill I installed azureus (and all the packages related to java and some other libraries). I don't mind implementing this process in startup, but now it is pointless until it is resolved. I thought since dhcpcd is not working I could perform the configuration by hand to overcome this. I still think of the possibility that the isp changed my dsl ip and while reinitiation of the connection the router changed the "dhcp" status from off, to , on.

As for the dmesg, I have to return from work first, but I don't remember having anything strange, the card seems recognised, but more of it when i'm home.

thank you!

----------

## koroumel

I'm back, here are the docs requested:

dmesg

```
Linux version 2.6.3 (root@livecd) (gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)) #1 Sun Jun 13 03:40:09 Local time zone must be set--see zic manu

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000000fff0000 (usable)

 BIOS-e820: 000000000fff0000 - 000000000fff3000 (ACPI NVS)

 BIOS-e820: 000000000fff3000 - 0000000010000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

255MB LOWMEM available.

On node 0 totalpages: 65520

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 61424 pages, LIFO batch:14

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.2 present.

ACPI: RSDP (v000 KT400                                     ) @ 0x000f6b80

ACPI: RSDT (v001 KT400  AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff3000

ACPI: FADT (v001 KT400  AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff3040

ACPI: MADT (v001 KT400  AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff7140

ACPI: DSDT (v001 KT400  AWRDACPI 0x00001000 MSFT 0x0100000d) @ 0x00000000

Built 1 zonelists

Kernel command line: root=/dev/hda6 vga=788

Initializing CPU#0

PID hash table entries: 1024 (order 10: 8192 bytes)

Detected 2128.092 MHz processor.

Using tsc for high-res timesource

Console: colour dummy device 80x25

Memory: 254464k/262080k available (2890k kernel code, 6880k reserved, 1050k data, 168k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 4194.30 BogoMIPS

Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)

Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU:     After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000

CPU:     After vendor identify, caps: 0383fbff c1c3fbff 00000000 00000000

CPU: CLK_CTL MSR was 6003d223. Reprogramming to 2003d223

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

CPU:     After all inits, caps: 0383fbff c1c3fbff 00000000 00000020

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU: AMD Athlon(tm) XP 2600+ stepping 01

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb380, last bus=1

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20040116

ACPI: IRQ9 SCI: Level Trigger.

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [ALKA] (IRQs 20)

ACPI: PCI Interrupt Link [ALKB] (IRQs 21)

ACPI: PCI Interrupt Link [ALKC] (IRQs 22)

ACPI: PCI Interrupt Link [ALKD] (IRQs 23)

Linux Plug and Play Support v0.97 (c) Adam Belay

SCSI subsystem initialized

drivers/usb/core/usb.c: registered new driver usbfs

drivers/usb/core/usb.c: registered new driver hub

ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5

ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

PCI: Using ACPI for IRQ routing

PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'

rivafb: nVidia device/chipset 10DE0110

rivafb: Detected CRTC controller 0 being used

rivafb: RIVA MTRR set to ON

rivafb: PCI nVidia NV10 framebuffer ver 0.9.5b (nVidiaGeForce2-M, 64MB @ 0xD8000000)

Machine check exception polling timer started.

devfs: v1.22 (20021013) Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

NTFS driver 2.1.6 [Flags: R/W].

udf: registering filesystem

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (CM) [SLPB]

ACPI: Fan [FAN] (on)

ACPI: Processor [CPU0] (supports C1 C2, 2 throttling states)

ACPI: Thermal Zone [THRM] (43 C)

Console: switching to colour frame buffer device 80x30

pty: 256 Unix98 ptys configured

lp: driver loaded but no devices found

Linux agpgart interface v0.100 (c) Dave Jones

[drm:drm_init] *ERROR* Cannot initialize the agpgart module.

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

parport0: PC-style at 0x378 [PCSPP(,...)]

lp0: using parport0 (polling).

Using anticipatory io scheduler

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

via-rhine.c:v1.10-LK1.1.19-2.5  July-12-2003  Written by Donald Becker

  http://www.scyld.com/network/via-rhine.html

eth0: VIA VT6102 Rhine-II at 0xe800, 00:50:70:62:1c:91, IRQ 11.

eth0: MII PHY found at address 1, status 0x784d advertising 05e1 Link 0000.

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

hda: ST340016A, ATA DISK drive

hdc: TEAC DV-W58G, ATAPI CD/DVD-ROM drive

hdd: TOSHIBA DVD-ROM SD-M1712, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=65535/16/63

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 < p5 p6 >

hdc: ATAPI 40X DVD-ROM CD-R/RW drive, 2048kB Cache

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 48X DVD-ROM drive, 128kB Cache

libata version 1.00 loaded.

ohci1394: $Rev: 1097 $ Ben Collins <bcollins@debian.org>

ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[11]  MMIO=[e2004000-e20047ff]  Max Packet=[2048]

Console: switching to colour frame buffer device 80x30

ehci_hcd 0000:00:10.3: EHCI Host Controller

ehci_hcd 0000:00:10.3: irq 10, pci mem d5831000

ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.3: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 6 ports detected

drivers/usb/host/uhci-hcd.c: USB Universal Host Controller Interface driver v2.1uhci_hcd 0000:00:10.0: UHCI Host Controller

uhci_hcd 0000:00:10.0: irq 11, io base 0000d800

uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

uhci_hcd 0000:00:10.1: UHCI Host Controller

uhci_hcd 0000:00:10.1: irq 5, io base 0000dc00

uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

uhci_hcd 0000:00:10.2: UHCI Host Controller

ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023c0031010ccc]

uhci_hcd 0000:00:10.2: irq 11, io base 0000e000

uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

drivers/usb/core/usb.c: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

drivers/usb/core/usb.c: registered new driver usb-storage

USB Mass Storage support registered.

drivers/usb/core/usb.c: registered new driver hid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

mice: PS/2 mouse device common for all mice

serio: i8042 AUX port at 0x60,0x64 irq 12

input: GenPS/2 Genius Wheel Mouse on isa0060/serio1

serio: i8042 KBD port at 0x60,0x64 irq 1

input: AT Translated Set 2 keyboard on isa0060/serio0

Advanced Linux Sound Architecture Driver Version 1.0.2c (Thu Feb 05 15:41:49 2004 UTC).

ALSA device list:

  #0: Sound Blaster Audigy (rev.3) at 0xd000, irq 5

oprofile: using timer interrupt.

NET: Registered protocol family 2

IP: routing cache hash table of 2048 buckets, 16Kbytes

TCP: Hash tables configured (established 16384 bind 32768)

ip_conntrack version 2.1 (2047 buckets, 16376 max) - 300 bytes per conntrack

ip_tables: (C) 2000-2002 Netfilter core team

ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/

arp_tables: (C) 2002 David S. Miller

NET: Registered protocol family 1

NET: Registered protocol family 17

ACPI: (supports S0 S1 S4 S5)

kjournald starting.  Commit interval 5 seconds

EXT3-fs: hda6: orphan cleanup on readonly fs

ext3_orphan_cleanup: deleting unreferenced inode 163019

EXT3-fs: hda6: 1 orphan inode deleted

EXT3-fs: recovery complete.

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 168k freed

Adding 506008k swap on /dev/hda5.  Priority:-1 extents:1

EXT3 FS on hda6, internal journal

via-rhine.c:v1.10-LK1.1.19-2.5  July-12-2003  Written by Donald Becker

  http://www.scyld.com/network/via-rhine.html

kobject_register failed for via-rhine (-17)

Call Trace:

 [<c02079a7>] kobject_register+0x57/0x60

 [<c0268e3a>] bus_add_driver+0x4a/0xc0

 [<c026931f>] driver_register+0x2f/0x40

 [<c020eecc>] pci_register_driver+0x5c/0x90

 [<d591b01b>] via_rhine_init+0x1b/0x29 [via_rhine]

 [<c0133a34>] sys_init_module+0x144/0x220

 [<c010941b>] syscall_call+0x7/0xb

 

atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).

atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.

atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).

atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly
```

Ifconfig

```
eth0      Link encap:Ethernet  HWaddr 00:50:70:62:1C:91

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:1770 (1.7 Kb)

          Interrupt:11 Base address:0xe800

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:7834 (7.6 Kb)  TX bytes:7834 (7.6 Kb)
```

/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$                                                                                        

# 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="192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0"

                                                                                        

# 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/"
```

Lets see now. In lsmod, I get no modules in the list, but when I "modprobe via-rhine" it says it is already loaded. DO you see anything going wrong enough?

Thnx!

----------

## Houdini

 *Quote:*   

> 
> 
> ```
> 
> via-rhine.c:v1.10-LK1.1.19-2.5  July-12-2003  Written by Donald Becker 
> ...

 

That's probably the source of your problems.  The driver is failing (in a spectacular way) when it's loaded.

Recompile the driver (recompile the kernel if you're not sure how to do the driver), make sure it's installed (make module_install), and reboot.

Let us know if that helped.

----------

## koroumel

I recompiled the kernel(2.6.3), I even recompiled 2.6.7-gentoo (downloaded before the problem)...but no go  :Sad:  . Honestly, I didn't think that the problem was the kernel. It must be something more hardware. You see, it is not working with 3 live-cds! And it did before  :Confused:  . I did not change any of my hardware and the settings are not changed by me either. Can any one tell me what exactly the dhcpcd does? (In detail, considering I'm a telecommunications engineer working as a software engineer I will understand)

  Thnx

----------

## Houdini

It might be the hardware.  Do you have another ethernet card to test?

dhcpcd simply sends out a dhcp request packet (broadcast, since you don't have an IP yet) and waits for a response.  When you get the response, it hopefully contains configuration information, which you then use to get your IP and everything working.  [url=http://www.faqs.org/rfcs/rfc2131.html]RFC 2131[/url has more info, if you want.

I don't think that dhcpcd is causing your error.  The stack trace in dmesg says that it is in via_rhine_init, which is the driver's initialization.

----------

## lblblb

some hopefully helpful observations and questions for you--

Given that three live-cd distros don't work (that used to work for you?), I have to agree that it's not likely dhcpcd. Nor is it likely the linux kernel itself, *if* it used to work on those other live-cd distros.

1. Forgive me for asking, but have you done a cold reboot? As in, power the computer off, wait a few minutes, and then power it back on.

2. If you look in the dmesg output of the other live cds, such as knoppix, do you see a similar warning about the device driver for the network adapter?

3. Run dhcpcd with debug output as per its man-page in order to see what's really going on while it looks like it locks up.

4. How do you know your dhcp server is working? I couldn't quite understand what you were saying with this:  *Quote:*   

> Since this morning, I'm thinking of something Idea , how can affect my network if the dhcp server in my router (speedtouch 510) is enabled...i set it to be off but after an ip change from isp who knows Confused . 

  You need to have a DHCP server on your network *enabled*.  I don't think your gentoo box can host the dhcp server for your LAN *and* have it's only LAN interface be set up by dhcp. 

4b. The init.d/net settings for dhcpcd_eth0 is new to me.  Is this why your router dhcp server is disabled, so dhcpcd sets the interface up entirely based on that static info?  Also, do you really need the default gateway setting?  If you want to go to static settings, just have things working under dhcp once, then netstat -r to get the correct route settings.  Then statically set up those routes. (It looked like that's what your problem was before.)

5. You said your winXP is working. Is it running on the exact same machine, as with a dual-boot setup?

6. The ifconfig output you provided shows that the driver thinks it sent out (TX) three packets, but has Received(TX) 0 packets. Therefore, it's impossible for dhcpcd to have received a response to react to. It's a problem with the (1) pc hardware (NIC, bios, etc), (2)dhcp server, or (3) kernel/driver module.

7. You can also compile your NIC's device driver statically into the kernel, i.e. not as a loadable module.  I don't know if that would make a difference, but it's a thought.

fwiw.

----------

## koroumel

Hello to all

 First of all, my apologies for leaving this thread for the weekend which I spent in an island with NO computers  :Very Happy:  !

 Now to the answers.

Again first of all... IT IS NOW WORKING  :Cool:  . The router was stuck by the ISP in such a way that I needed to reprogram it. But keep reading.

In answer to lblblb:

1) Yes I tried cold boot, obviously it was not that.

2) knoppix ouput had the same warning, but is now fixed! The router had to do with it obviously.

3) I didn't try that  :Embarassed:  .

4) The router has a web based configuration tool, in which I can set its' internal dhcp server "on" "auto" "off". I always had it to "off" and it was like that while the problem occured. The only DHCP request is from my computer while in linux. Till then the reply was good enough to make it work.

4b) The setting looks ok to my knowledge of the form of the script. I need the static info because I can't rely to DHCP... cause there is no DHCP server running and virtualy it is working by luck! The way it is now, I only have to run dhcpcd eth0, in order to get connected. But I still want to avoid that too. The gateway is the address of my router/gateway so I need it to have internet. If I leave dhcpcd to do it, it gives 192.168.0.1... which is not right.

5)My Win XP are in the same machine with dual boot.

6) I noticed (and mentioned I think) that in ifconfig. It is always the same before i do dhcpcd.

7) I've compiled 3 different kernels, that didn't make a difference.

Now, after a fresh set-up of the DSL router, and with the settings I have posted, I get everything set up but I can't connect to the internet (or ping the router) unless I do dhcpcd eth0 -s 192.168.0.3. I can connect to the LAN withouth it, but for internet I need it, any ideas how to get rid of it? It is also interesting that by these configs, I don't have the VERY common problem many people have in this forum... that of:

```
Failed to bring eth0 up 

Error: Problem starting needed services. 

"netmount" was not started 
```

Houdini... i'm all over the url you posted, I may find what dhcp does and do it myself!

That was it. If any one has a way to avoid dhcpcd i will really appreciate it. Thank you all  :Razz:  .

----------

## Woollyfoot

koroumel,

If you want to avoid using dhcpd and can't rely on the dhcp server, why not just set your own static address? You can do that by commenting out every line in the /etc/conf.d/net and adding:

```
iface_eth0="192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0"
```

This should allow /etc/init.d/net.eth0 start to work but if that fails again, then it sounds like a driver problem.

----------

## koroumel

Woollyfoot, I already have this line in my /etc/conf.d/net (as posted above). It works like a charm for LAN, but not for internet (I can't see/ping my gateway)... so the driver is ok. There just must be a parameter somewere that is causing the hassle, and that is set with dhcpcd. The IP of my gateway is 10.0.0.138... I've tried changing the "broadcast" to 10.0.0.255 but no luck (I don't even know if it is relevant to my problem  :Embarassed:  )

To make things clear, till now, on bot I have:

-IP: 192.168.0.3

-Broadcast 192.168.0.255

-netmask 255.255.255.0

-gateway 10.0.0.138

-DNS 10.0.0.138 (yes it is supposed to be like this, it reroutes the ISP dns's to 10.0.0.138)

All these without running dhcpcd eth0 -s 192.168.0.3. The LAN is working, and samba but when I do:

```
ping 66.102.11.104 (google)
```

it responds network unreachable. It does the same even if I ping 10.0.0.138  :Rolling Eyes:  .When I run dhcpcd, NOTHING of the above changes and the internet is working (i can ping the above addresses)  :Confused: 

  Regards.

:EDIT: There is something that changes with dhcpcd eth0 -s 192.168.0.3, and it's the entry of the nameserver in resolv.conf. That's because I don't use the -r parameter (for no particular reason), thus I have to change it manualy back to 10.0.0.138.

----------

## Woollyfoot

Ok, see if this helps ...

Edit /etc/conf.d/net so it has the following lines in it only:

```
iface_eth0="192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0"

gateway="eth0/10.0.0.138"
```

Then edit /etc/resolv.conf so it reads:

```
nameserver 10.0.0.138

search
```

Finally issue a:

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

That should be all that's needed to get the linux box working. If you still can't access the internet, double check all the router's settings (via the web interface i'd guess). Make sure that it's being assigned an IP by your ISP and that you haven't disabled the DHCP client.

----------

## koroumel

Dude you confuse me now  :Confused: 

 Why should I leave the DHCP server on since I don't want to use it  :Question: 

 The router has an IP from the ISP (both because I've seen it and because if not the others getting a connection through it would shout loud), so this is not an issue.

  Finally it looks as if the only thing I have to do is to delete everything but the two lines you mentioned in /etc/conf.d/net. But I will do that as soon as I return from work.

----------

## Woollyfoot

Well you didn't say that anyone else was using the connection and that theirs was working  :Wink: 

As for the confusing bit ... notice i put DHCP client not server ... the router will have a DHCP client to receive an IP address from your ISP ... this doesn't affect your LAN configuration ... however if other people can access the internet, this isn't the problem.

So ... alter the /etc/conf.d/net as i said before and see what happens!

----------

## lblblb

ermm. Am I missing something here?

The gateway needs to be on the same subnet as the lan interface.  You can specify that in the /etc/conf.d/net file as before.

In other words, 

```
iface_eth0="192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0"

gateway="eth0/192.168.0.XXX"
```

where "XXX" is the last part of the ip address of the *LAN* interface on your router.

On your dsl *gateway/router* is where you specify the ISPs gateway. (note, not in the router dhcp server config of the dsl router, but in the router dhcp client config, if that makes sense to you. You want the router's wan interface to use the isp's default gateway (though usually you don't have to specify this anyway, why are you specifying it? are you paying for/assigned a static ip address from your isp?), but if you did use the router's dhcp server you wouldn't want it to give client machines the isp gateway -- only dsl router lan interface.) If that doesn't make sense to you, don't worry about it.

Bottom line, your computer doesn't know how to get to 10.x.x.x unless you give it the address of a gateway on its local network. Then it's the job of the gateway to get data to the 10.x.x.x addresses.

[code]

PC/eth0(192.168.0.3)<--->(192.168.0.XXX)LANif/DSLrouter/WANif(10.0.0.YYYdhcp?)<--->(10.0.0.ZZZ)INTif/ISProuter/EXTif(RRR.SSS.TTT.UUU)<--->Internet

I'm not a networking guru, but the above is correct, given the info you provided.  Now, I have seen where for some reason bringing up the interface didn't set up the routes correctly, but set up the above first and see if it works.  If it doesn't, then you need to statically set up the routes.

But any given interface only knows about the gateway that's attached to the same subnet, when it comes to default gateways.

----------

## koroumel

Good morning to you all!

 Woollyfoot, I did not try your solution... sorry, but women have a way to compete with computers  :Wink:  .

 lblblb, the router is allocating some IPs on its start-up. One is given from the ISP, and the other is its own. The second one is 10.0.0.138. From the ISP it is also receiving the ISPs gateway and the ISPs DNS. Both it redirects to 10.0.0.138 so that the computers connected don't have to bypass the firewall+NAT to communicate to the DSN/gateway of the ISP. There has been no problem with the settings of the gateway or the DNS to 10.0.0.138, either in windows or linux so far... except that in linux dhcpcd overwrites the resolv.conf file if I forget to put the correct parameters  :Embarassed:  . But nano-ing it back to 10.0.0.138 makes things work.

  I don't remember trying to set my IP/boradcast to 10.0.0.XXX, but  I think I did with no better results. Still, I'll try this too today when I get back home.

 Ohh, and for those that will start blaming the configuration of the firewall of the router, it works in WIN XP and Linux..

My status: 

On bootup I get no network errors, when finished, I open a console and do:

```
ping 192.168.0.7 (another computer)
```

works perfectly, then:

```
ping 66.102.11.104 (www.google.com)
```

it doesn't,

```
ping www.google.com
```

doesn't either, so:

```
dhcpcd eth0 -s 192.168.0.3
```

then:

```
ping 66.102.11.104
```

works!

```
ping www.google.com
```

doesn't

```
nano -w /etc/resolv.conf (change nameserver from 192.168.0.2-set by dhcpcd-to 10.0.0.138)
```

I can now ping to any IP, and internet works for any app.

----------

## lblblb

Hey,

sorry if i'm missing something, but I dont' think we're talking about all the same things.

1. What is the ip address of the WAN interface of the router, and is it dhcp'd from the ISP?

2. What is the ip address of the LAN interface of the router?

----------

## nobspangle

could you post the output of

ipconfig /all

from one of your working windows machines, I think that would clear everything up.

----------

## koroumel

Hello again,

 lblblb, the WAN interface IP is given by the ISP dynamically, the LAN IP is set by the router to 10.0.0.138. The router is ALWAYS on-line, so the ISP changes the WAN IP every 4 days. I got into suspicions from your last post, I tried 

```
iface_eth0="192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0" 

gateway="eth0/10.0.0.138"
```

I did not work  :Sad:  , but then I tried 

```
iface_eth0="10.0.0.1 broadcast 10.0.0.255 netmask 255.255.255.0" 

gateway="eth0/10.0.0.138"
```

and it kinda worked  :Confused:  . You were right, while setting manually the IPs, the gateway must be in the same IP range as the computer, so now I can ping and configure the router but I still cannot connect to the internet..."network unreachable"  :Mad:  . So again, if I do 

```
dhcpcd eth0 -s 10.0.0.138
```

 it works, but this time it does not change the resolv.conf since the entry there is of the same IP range  :Smile:  . In order to dhcpcd, I have to keep the dhcp server of the router on now... I don't remember how I got around this problem before. It would be much more useful if we could find the solution "assuming" that the LAN IP of the router cannot change.

nobspangle, I will post ipconfig/all as soon as I return home.(until we finish with this thread, you will know exactly what time I get to work and leave!  :Laughing:  )

----------

## lblblb

for what it's worth, normally a gateway address is on one end of a subnet range, like 10.0.0.254 or 10.0.0.1, not 10.0.0.138.  But that's not important.  Based on your configuration:

so this should be  all that is in your /etc/conf.d/net:

```
iface_eth0="10.0.0.1 broadcast 10.0.0.255 netmask 255.255.255.0"

gateway="eth0/10.0.0.138"

```

You don't want to use dhcp, so dont!

and this should be in your /etc/resolv.conf:

```
nameserver 10.0.0.138

nameserver aaa.aaa.aaa.aaa
```

 make the aaa.aaa.aaa.aaa be the same as the DNS server that your isp gives to your router. That way, if for some reason your router didn't resolve host names, your computer can bypass it and go directly to the ISP's DNS server to resolve host names.

save those files.

There should be no references to 192.168. anywhere in your config files.

then do this:

```
# /etc/init.d/net.eth0 stop

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

# ping -c 3 10.0.0.1

# ping -c 3 10.0.0.138

# ping -c 3 64.233.167.104

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

1. If all four "ping" commands succeed, then you're good to go.  You may init 1 then init 3 just to make yourself feel better that your config will work next time (if ever) you reboot.

2. If the first 3 "ping" commands succeed, but the fourth fails, then you're not resolving dns names correctly.  Check to see if your nameserver entries were overwritten in resolv.conf .  They shouldn't have been, because you have no references to dhcp in your /etc/conf.d/net , *right*?

3. If the third ping command fails, then you have a routing problem.

4. If the second ping command fails, then you aren't reaching your router. 

5. If the first ping command fails, then your local network interface isn't set up correctly.

I'm sure you're feeling very frustrated by now.  Don't be.  But if you do the above, it *will work*.

----------

## koroumel

the /etc/conf.d/net, is exactly like you posted, in the resolv.conf, the only line i'm missing is that of 

```
nameserver aaa.aaa.aaa.aaa
```

this way, I can do up to the two first pings, for the last two I get "network unreachable". I can't understand what dhcpcd does that does not change my IP settings and enables the internet connection  :Rolling Eyes:  . I though that it could be that I did not set the router to accept connections from 10.0.0.1(since with dhcpcd or Windows I didn't need to for 192.168.0.3). So I opened the address and hoped that this could be it...but noooo, i moved no further that what I described above  :Sad:  . It is funny though that in windows I can use the gateway ,although it is in a totaly different ip range, whithout using dhcp  :Confused:   I must find a way to change the IP of the gateway.

----------

## lblblb

did you do *all* the steps I listed above? also a /etc/init.d/net.eth0 restart before the pings?

Please provide us output from *all* of the following:

1. gentoo box without dhcp: ifconfig eth0; netstat -r

2. gentoo box with dhcp (where it works for you): ifconfig eth0; netstat -r

3. windows XP box that works: ipconfig /all

4. windows XP box that works: netstat -r

thanks.

----------

## koroumel

GOOD MORNING!

lblblb, yes I followed every step. The other thing I am doing now is to compose a proper .ini file for the router... this one sucks because I can't set the IP I want for the router, and dhcp is properly disabled. So I will change the IP of the router to match the already existant IP range...to something like 192.168.0.2. I will post the output you required this afternoon.

----------

## koroumel

And here it is! Our pretty cooperation has to end here people  :Crying or Very sad:  . I changed the config file of the router into one that also sets its IP to 192.168.0.2 for both the gateway and the DNS and now it is working with no dhcpcd!  :Mr. Green:   :Cool: 

  Thank you so much for the help you generously offered!

----------

