# dhcp desaster? SOLVED

## lo-jay

o.k. i'm behind a linksys router that hands out ip's in the 192.168.1.x

range. running an old thinkpad w/ a xircom pcmcia card - that used to work!

no so latetly.

 *Quote:*   

> ifconfig

  shows me the card is recognized though.

```
# dhcpcd eth1 start
```

gives: 

```
err, eth1: dhcpcd already running on pid 4180 (/var/run/dhcpcd-eth1.pid)
```

```
 cat /var/log/messages | grep -i eth1 
```

shows 

```
... udev:renamed network interface eth0 to eth1

         ... xircom cardbus adaptor found, registering as eth1, using irq 10

         ... eth1: dhcpcd 3.2.3 starting

         ... eth1: hardware address = ....

         ... eth1: DUID = ...

         ... eth1: broadcasting for a lease

         ... eth1: no IPv6 routers present

         ... eth1: timed out

         ... eth1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-eth1.info

         ... eth1: using IPV4ALL address 169.254.116.64/16

         ... eth1: adding IP address 169.254.116/16

         ... eth1: exiting

         ... eth1: adding IP address 169.254.116/16

         ... eth1: adding IP address 169.254.116/16

         .

         .

         .

```

and i can't ping my router:

```
connect: Network is unreachable
```

what's wrong - am a bit of a network dummy  :Wink: 

----------

## ph03n1x

think "dhcpd eth1" should be enough but usually dhcp is invoked automatically

if you kill dhcpd manually you have to delete the mentioned file to be able to restart it hth

----------

## alunduil

If you get that error usually you want to tell dhcpcd to tear down the existing connection with a dhcpcd -k eth?, and then perform the dhcpcd eth? again.

Regards,

Alunduil

----------

## lo-jay

kay - this gives me this output:

```
err, eth1: timed out

err, eth1 lease information file `/var/lib/dhcpcd/dhcpcd-eth1.info ` does not exist

warn, eth1:using IPV4ALL address 169.254.155.253
```

what's this trying to tell me?

thanks again!

ps: the file does exist, should i just try deleting it?

pps: and where does this bloody ip 169.254.155.x come from???

----------

## DarKRaveR

It tells you, that there was no answer from any dhcp on eth1.

No, you should get your dhcp server running, so it will answer an request, or tweak the dhcp client, so it will communicate with the server properly.

And the address comes from: http://tools.ietf.org/html/rfc3927#section-2.7

----------

## lo-jay

sorry - not sure i get you?

my router works, got my other box connected to it - as you see.

so how do i have to tweak the dhcp client?

thanks again!

----------

## SeaTiger

Did you do a emerge --sync and update world lately?

Post output of your ifconfig and also /etc/conf.d/net.

----------

## lo-jay

no net - can't emerge sync...

/etc/conf.d/net

```
config_eth1=( "dhcp" )

dhcp_eth1="nodns nontp nonis -N"
```

ifconfig

```
eth1  Link encap:Ethernet  HWaddr 00:10:A4:E2:C9:F8

          inet addr:169.254.197.215  Bcast:169.254.255.255  Mask:255.255.0.0

          inet6 addr: fe80::210:4aff:fee2:c9f8/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:891318 (870.4 Kb)  TX bytes:532068 (519.5)

          Interrupt:16 Base address:0x1000

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:294 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:17219 (16.8 Kb)  TX bytes:17219 (16.8 Kb)

```

cheers

----------

## alunduil

Did you notice the typo in that configuration you posted? You have a closing quote, but not opener. Don't know if that's in your config file, but thought I'd bring your attention to it.

Regards,

Alunduil

----------

## lo-jay

handcopied - typo...-

----------

## SeaTiger

Did you try to use static ip to test if network work? At least we can narrow down problem that way.

----------

## Inodoro_Pereyra

What about removing dhcp_eth1="nodns nontp nonis -N" line and restarting dhcpcd?

Also, you can go back online while troubleshooting your dhcp client by issuing:

```
ifconfig eth1 [Here the IP number] netmask [Here the netmask]

route add default gw [Here the IP number of your gateway]

echo "nameserver [Here the IP number of your nameserver]" >> /etc/resolv.conf
```

Where the most of the times, the IP number of Nameserver and Gateway are the same as your router IP.

Thats what junksiu was talking about, and, beeing online, you can now emerge --sync and update.

Regards.

----------

## jcat

I have to ask the obvious...    ...but, is you ethernet cable ok?

Always check the basics!   :Very Happy:   Especially if it stops working with no config changes.

swap cables and switch or router ethernet ports etc.  Eliminate all potential hardware issues first.

Nothing in your /var/log/messages points to a problem with eth1, just that it can't pick up an address.

Cheers,

jcat

----------

## lo-jay

o.k - correct me if i'm wrong pls:

my netmask is 255.255.255.0 ?

router ip 192.168.1.1 which would be equal to gw & nameserver ?

how do i know the eth1 ip???

sorry! did found it in my routers device list!

am syncing!!!   :Laughing: 

```
# ifconfig

eth1      Link encap:Ethernet  HWaddr 00:10:A4:E2:C9:F8

          inet addr:169.254.197.215  Bcast:169.254.197.255  Mask:255.255.255.0

          inet6 addr: fe80::210:a4ff:fee2:c9f8/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:11114290 (10.5 Mb)  TX bytes:593930 (580.0 Kb)

          Interrupt:10 Base address:0x1000

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:203 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:13918 (13.5 Kb)  TX bytes:13918 (13.5 Kb)

# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

169.254.197.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1

```

thanks a lot!

----------

## jcat

 *lo-jay wrote:*   

> 
> 
> sorry! did found it in my routers device list!
> 
> am syncing!!!  
> ...

 

You should pick an IP address that isn't in your router's DHCP range, and that doesn't conflict with anything else that's statically assigned.

Cheers,

jcat

----------

## lo-jay

so, this one is in my routers dhcp range - why is this bad?

range is 

```
 192.168.1.100 - 149
```

thanks again!

----------

## jcat

It probably doesn't matter so much in on your home network, but your router might give out that address to something else because it doesn't know about your own statically assigned address, hence you would have duplicated IP addresses on your network.  That's not good!

It's just good practice to keep statically assigned addresses out of any DHCP ranges  :Smile: 

Cheers,

jcat

----------

## lo-jay

so i rsync'ed & updated deep world my system, but eth1 still

doesn't come up by itself.

here a part of my dmesg:

```
Freeing unused kernel memory: 296k freed

pccard: CardBus card inserted into slot 0

PCI: Enabling device 0000:01:00.0 (0000 -> 0003)

PCI: Setting latency timer of device 0000:01:00.0 to 64

eth0: Xircom cardbus revision 3 at irq 10

PCI: Enabling device 0000:01:00.1 (0000 -> 0003)

0000:01:00.1: ttyS0 at I/O 0x1080 (irq = 10) is a 16550A

NET: Registered protocol family 1

udev: renamed network interface eth0 to eth1

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

PCI: Found IRQ 11 for device 0000:00:00.1

PCI: Sharing IRQ 11 with 0000:00:00.2

PCI: Setting latency timer of device 0000:00:00.1 to 64

USB Universal Host Controller Interface driver v3.0

intel8x0_measure_ac97_clock: measured 55113 usecs

intel8x0: clocking to 48000

PCI: setting IRQ 10 as level-triggered

PCI: Found IRQ 10 for device 0000:00:07.2

uhci_hcd 0000:00:07.2: UHCI Host Controller

uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1

uhci_hcd 0000:00:07.2: irq 10, io base 0x00008000

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

usb 1-2: new low speed USB device using uhci_hcd and address 2

usb 1-2: configuration #1 chosen from 1 choice

input: Darfon USB Optical Mous as /class/input/input2

input: USB HID v1.10 Mouse [Darfon USB Optical Mous] on usb-0000:00:07.2-2

usbcore: registered new interface driver cdc_acm

drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN ada$

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1 across:506036k

xircom cardbus adaptor found, registering as eth1, using irq 10

xircom_cb: Link status has changed

xircom_cb: Link is 100 mbit

eth1: no IPv6 routers present
```

insights someone?

cheers!

----------

## danomac

I've found that dhcpcd just hates some dhcp servers, even with the -k option. Have you tried something else, like dhclient?

----------

## jcat

We might as well see your 

```
cat /etc/con.d/net
```

 and 

```
ifconfig -a
```

 just to double check there is no config issue.

Cheers,

jcat

----------

## lo-jay

here we go:

```
# ifconfig -a

dummy0    Link encap:Ethernet  HWaddr A2:69:22:BD:64:09

          BROADCAST NOARP  MTU:1500  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:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth1      Link encap:Ethernet  HWaddr 00:10:A4:E2:C9:F8

          inet addr:192.168.1.149  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::210:a4ff:fee2:c9f8/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:41514 (40.5 Kb)  TX bytes:20487 (20.0 Kb)

          Interrupt:10 Base address:0x1000

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:49 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:3490 (3.4 Kb)  TX bytes:3490 (3.4 Kb)

sit0      Link encap:IPv6-in-IPv4

          NOARP  MTU:1480  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:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

&

```
 # cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth1=( "dhcp" )

dhcp_eth1="nodns nontp nonis -N"

```

thanks a lot one more time!!!

----------

## carlosp

I am having the same problem. With this config

```

config_eth0=( "dhcp" )

```

I dont get anything, but with this one

```

config_eth0=( "132.248.162.17 netmask 255.255.255.0 brd 132.248.162.255" )

routes_eth0=( "default gw 132.248.162.254" )

dns_servers_eth0=( "132.248.10.2" "132.248.33.6" )

```

I can surf. more over, 

```

tiotulio etc # killall dhcpcd; dhcpcd eth0

dhcpcd: no process killed

err, eth0: timed out

warn, eth0: using IPV4LL address 169.254.108.139

```

I have other machine with with gentoo with which I can obtain an address from the DHCP server.

----------

## carlosp

There seems to be a problem with the package. If one masks it:

```

tiotulio etc # cat /etc/portage/package.mask 

>net-im/skype-1.4.0.118

#=net-im/skype-2.0.0.13-r1

=net-misc/dhcpcd-3.2.3

```

and then emerges it,  

```

tiotulio etc # emerge -av dhcpcd

```

things go back to normal. I guess it is a bug. What is the appropriate way to proceed? If things work also for you please include a SOLVED in the topic.

----------

## danomac

 *carlosp wrote:*   

> things go back to normal. I guess it is a bug. What is the appropriate way to proceed? If things work also for you please include a SOLVED in the topic.

 

Yep, I got bit by this while configuring my laptop. There is a bug already filed. I guess mask it for now, until it gets fixed...

----------

## lo-jay

yeah - that worked for me too - great  :Very Happy: 

thanks a lot!

----------

