Wow would I like to put you on my speed dial!UberLord wrote:I'm the author of dhcpcd-3, so I'm probably a little biased when saying that dhcpcd is the best
dhclient is the most flexible DHCP client there is. However, it's bloated, slow, heavily patched by Gentoo (my work I must admit) and has the occasional hiccup. It also require external binaries such as ifconfig and others.
dhcpcd is not flexible in the slightest, but is a lot smaller and faster. It has no need for any external binaries. It also supports more DHCP features out of the box. dhcpcd also has the occasional hiccup as Gentoo is the main testbase I have
dhcpcd-3.3 (currently in heavy development) will be even smaller than dhcpcd-3.2 (by 15k currently) and be a lot more flexible (or allow to be more flexible in the future), hopefully without sacrificing any features.
Code: Select all
tfoerste@n22 ~/workspace $ grep ^RC_PLUG_SERVICES= /etc/conf.d/rc
RC_PLUG_SERVICES="!*"
Code: Select all
tfoerste@n22 ~/workspace $ cat /etc/conf.d/net
# /etc/conf.d/net
#
# LAN
# dhcp, static ip for local services like apache, ...
#
config_eth0=(
"dhcp"
"192.168.0.254/24"
)
dhcp_eth0="nontp"
dhcpcd_eth0="-L -t 25 -h <hostname>"
# DSL at home
#
config_ppp0=( "ppp" )
link_ppp0=( "eth0" )
plugins_ppp0=( "pppoe" )
username_ppp0="foo"
password_ppp0=
pppd_ppp0=(
"defaultroute"
"usepeerdns"
"maxfail 1"
)
# WLAN
#
modules=( "wpa_supplicant" )
wpa_supplicant_ath0="-Dmadwifi"
config_ath0=( "dhcp" )
dhcp_ath0="nontp nosendhost"
dhcpcd_ath0="-L -t 20"
Well, if neither dhcpcd or dhclient work on eth0, then we can probably assume a problem with eth0.cwc wrote:How do I point my nics to dhcpcd? Dhclient works with ath0 but not eth0.
I've compiled my kernel and I can use both ath0 and eth0 (if I'm lucky, I even can pick up the neighbors WAP). I just don't have things set correctly.
I need to look at the kernel options more closely and recompile so I bind my nics to the kernel.
error on boot:
* dhcp
* Running dhcpcd ...
err, etho: timed out
warn, eth0: using IPV$LL address 169.254.42.198 ( yuk!)
Anyway. If you write back I'd appreciate. I really want to learn how to do this.
WIth my ThinkPad T41 I have the problem, that during a boot the eth0 device isn't initialized yet when the net.eth0 services is (automatically) started. Therefore I put the "!* into the rc file and added net.eth0 to the default level instead. Now the kernel already finishes the device before it's being used.UberLord wrote:Well, if neither dhcpcd or dhclient work on eth0, then we can probably assume a problem with eth0.
Is the cable plugged in and working? You should install ifplugd to manage the cable in/out events for you
Could you explain "isn't initialized yet" a little more?toralf wrote:WIth my ThinkPad T41 I have the problem, that during a boot the eth0 device isn't initialized yet when the net.eth0 services is (automatically) started. Therefore I put the "!* into the rc file and added net.eth0 to the default level instead. Now the kernel already finishes the device before it's being used.
I mean eth0. If I let the Gentoo boot scripts automatically start net.eth0 then dhcpcd times out during boot. But I can get an IP address immediately after my sytem has booted.UberLord wrote:Could you explain "isn't initialized yet" a little more?
Also, is eth0 wired or wireless?
toralf wrote:Probably you need sth like this :Code: Select all
tfoerste@n22 ~/workspace $ grep ^RC_PLUG_SERVICES= /etc/conf.d/rc I've yet to update /etc/conf.d/rc. I can not get dhcpcd to work. Here is my tty session for ath0. I wrote a simple script to connect to my wap essid = "TMA" I can connect to my neighbor at 192.168.1.1 my WAP is 192.168.0.1 weird. [code] tma ~ # iwconfig lo no wireless extensions. eth1 no wireless extensions. eth0 no wireless extensions. wifi0 no wireless extensions. ath0 IEEE 802.11g ESSID:"TMA" Nickname:"" Mode:Managed Frequency:2.452 GHz Access Point: 00:1C:F0:C5:EF:CB Bit Rate:24 Mb/s Tx-Power:18 dBm Sensitivity=1/1 Retry:off RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=62/70 Signal level=-34 dBm Noise level=-96 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 tma ~ # tma ~ # dhcpcd ath0 err, ath0: timed out warn, ath0: using IPV4LL address 169.254.115.3 tma ~ # tma ~ # dhclient ath0 Internet Systems Consortium DHCP Client V3.0.3-Gentoo-r9 Copyright 2004-2005 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/products/DHCP wifi0: unknown hardware address type 801 eth1: unknown hardware address type 24 wifi0: unknown hardware address type 801 eth1: unknown hardware address type 24 Listening on LPF/ath0/00:14:6c:fa:b1:46 Sending on LPF/ath0/00:14:6c:fa:b1:46 Sending on Socket/fallback DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 3 DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 16 DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 16 DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 10 DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 10 No DHCPOFFERS received. Trying recorded lease 192.168.1.102 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. --- 192.168.1.1 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms Trying recorded lease 192.168.0.2 PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data. --- 192.168.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.174/0.174/0.174/0.000 ms bound: immediate renewal. DHCPREQUEST on ath0 to 255.255.255.255 port 67 tma ~ # iwconfig lo no wireless extensions. eth1 no wireless extensions. eth0 no wireless extensions. wifi0 no wireless extensions. ath0 IEEE 802.11g ESSID:"TMA" Nickname:"" Mode:Managed Frequency:2.452 GHz Access Point: 00:1C:F0:C5:EF:CB Bit Rate:48 Mb/s Tx-Power:18 dBm Sensitivity=1/1 Retry:off RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=60/70 Signal level=-29 dBm Noise level=-89 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 tma ~ # ifconfig ath0 Link encap:Ethernet HWaddr 00:14:6C:FA:B1:46 inet addr:169.254.115.3 Bcast:169.254.115.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1409 errors:0 dropped:0 overruns:0 frame:0 TX packets:238 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:209466 (204.5 Kb) TX bytes:40952 (39.9 Kb) eth0 Link encap:Ethernet HWaddr 00:20:E0:66:0E:96 inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1493 errors:0 dropped:0 overruns:0 frame:0 TX packets:746 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:493629 (482.0 Kb) TX bytes:159664 (155.9 Kb) 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:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:672 (672.0 b) TX bytes:672 (672.0 b) wifi0 Link encap:UNSPEC HWaddr 00-14-6C-FA-B1-46-FB-82-00-00-00-00-00-00-00-00 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:13798 errors:0 dropped:0 overruns:0 frame:1360 TX packets:440 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:199 RX bytes:2814037 (2.6 Mb) TX bytes:56108 (54.7 Kb) Interrupt:10
toralf wrote:Probably you need sth like this :Code: Select all
tfoerste@n22 ~/workspace $ grep ^RC_PLUG_SERVICES= /etc/conf.d/rc RC_PLUG_SERVICES="!*" Here is my tty for eth0. I have no idea why I can use dhclient but not dhcpcd and why my ath0 does not work(previous post) ath0 does find my ap though. [code] tma ~ # ifconfig ath0 down tma ~ # ifconfig eth0 down tma ~ # dhcpcd eth0 err, eth0: timed out warn, eth0: using IPV4LL address 169.254.42.198 tma ~ # dhclient eth0 Internet Systems Consortium DHCP Client V3.0.3-Gentoo-r9 Copyright 2004-2005 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/products/DHCP eth1: unknown hardware address type 24 eth1: unknown hardware address type 24 Listening on LPF/eth0/00:20:e0:66:0e:96 Sending on LPF/eth0/00:20:e0:66:0e:96 Sending on Socket/fallback DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 192.168.0.1 bound to 192.168.0.2 -- renewal in 37565 seconds.
Code: Select all
dhcpcd -I '' eth0UberLord wrote:You can use the -I '' option like soIf that works, then your DHCP server isn't RFC compliant.Code: Select all
dhcpcd -I '' eth0
Code: Select all
dhcpcd -I '' eth0Code: Select all
tcpdump -s 0 -i eth0 -w /tmp/dump.pcap